Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
uchenily committed May 9, 2024
1 parent 37b55d8 commit 1fddd97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_coredump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ using namespace uvio::sync;
using namespace uvio::net;

auto main() -> int {

auto server = [](Latch &start, Latch &finish) -> Task<> {
std::array<char, 64> 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);
Expand All @@ -26,7 +27,7 @@ auto main() -> int {
auto client = [](Latch &start, Latch &finish) -> Task<> {
std::array<char, 64> 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);
Expand All @@ -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());
Expand Down

0 comments on commit 1fddd97

Please sign in to comment.