diff --git a/tests/test_coredump.cpp b/tests/test_coredump.cpp index 31f2b36..1207077 100644 --- a/tests/test_coredump.cpp +++ b/tests/test_coredump.cpp @@ -7,12 +7,13 @@ using namespace uvio::sync; using namespace uvio::net; auto main() -> int { + auto server = [](Latch &start, Latch &finish) -> Task<> { std::array buf{}; auto listener = TcpListener(); listener.bind("localhost", 12345); - start.count_down(); + // start.count_down(); auto stream = co_await listener.accept(); auto nread = co_await stream.read(buf); @@ -26,7 +27,7 @@ auto main() -> int { auto client = [](Latch &start, Latch &finish) -> Task<> { std::array buf{}; - co_await start.arrive_and_wait(); + // co_await start.arrive_and_wait(); auto stream = co_await TcpStream::connect("localhost", 12345); co_await stream.write("test message"); auto nread = co_await stream.read(buf); @@ -43,6 +44,7 @@ auto main() -> int { spawn(client(start, finish)); co_await start.arrive_and_wait(); // co_await finish.arrive_and_wait(); + co_return; }; block_on(test());