From 38ef3a75cc74b5adb0cb22a72fc0426e8ffd094f Mon Sep 17 00:00:00 2001 From: Arseny Smirnov Date: Tue, 21 Jul 2020 18:29:39 +0300 Subject: PollableFd: explicit sync_with_poll GitOrigin-RevId: 71fa35a594816e84e372ebcfa9d0077a13f26a62 --- benchmark/bench_http_server_fast.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'benchmark/bench_http_server_fast.cpp') diff --git a/benchmark/bench_http_server_fast.cpp b/benchmark/bench_http_server_fast.cpp index c4353dc17..c180c7856 100644 --- a/benchmark/bench_http_server_fast.cpp +++ b/benchmark/bench_http_server_fast.cpp @@ -55,19 +55,18 @@ class HttpEchoConnection : public Actor { } void loop() override { + sync_with_poll(fd_); auto status = [&] { TRY_STATUS(loop_read()); TRY_STATUS(loop_write()); return Status::OK(); }(); - if (status.is_error() || can_close(fd_)) { + if (status.is_error() || can_close_local(fd_)) { stop(); } } Status loop_read() { - if (can_read(fd_)) { - TRY_STATUS(fd_.flush_read()); - } + TRY_STATUS(fd_.flush_read()); while (true) { TRY_RESULT(need, reader_.read_next(&query_)); if (need == 0) { -- cgit v1.2.3