File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,13 @@ TEST_CASE("benchmark tcp::server echo server thread pool", "[benchmark]")
404
404
while (true )
405
405
{
406
406
auto pstatus = co_await client.poll (coro::poll_op::read);
407
+ if (pstatus != coro::poll_status::event)
408
+ {
409
+ REQUIRE_THREAD_SAFE (pstatus == coro::poll_status::closed);
410
+ // the socket has been closed
411
+ break ;
412
+ }
413
+
407
414
REQUIRE_THREAD_SAFE (pstatus == coro::poll_status::event);
408
415
409
416
auto [rstatus, rspan] = client.recv (in);
@@ -597,6 +604,13 @@ TEST_CASE("benchmark tcp::server echo server inline", "[benchmark]")
597
604
while (true )
598
605
{
599
606
auto pstatus = co_await client.poll (coro::poll_op::read);
607
+ if (pstatus != coro::poll_status::event)
608
+ {
609
+ REQUIRE_THREAD_SAFE (pstatus == coro::poll_status::closed);
610
+ // the socket has been closed
611
+ break ;
612
+ }
613
+
600
614
REQUIRE_THREAD_SAFE (pstatus == coro::poll_status::event);
601
615
602
616
auto [rstatus, rspan] = client.recv (in);
You can’t perform that action at this time.
0 commit comments