aboutsummaryrefslogtreecommitdiffhomepage
path: root/benchmark/bench_http_server_fast.cpp
diff options
context:
space:
mode:
authorArseny Smirnov <arseny30@gmail.com>2020-07-21 18:29:39 +0300
committerArseny Smirnov <arseny30@gmail.com>2020-07-21 18:29:39 +0300
commit38ef3a75cc74b5adb0cb22a72fc0426e8ffd094f (patch)
treef4c9c106986f47c19568f458532def3a22e83328 /benchmark/bench_http_server_fast.cpp
parentceb49d01432fce1627e7b5d5a7594eb2eac946d1 (diff)
PollableFd: explicit sync_with_poll
GitOrigin-RevId: 71fa35a594816e84e372ebcfa9d0077a13f26a62
Diffstat (limited to 'benchmark/bench_http_server_fast.cpp')
-rw-r--r--benchmark/bench_http_server_fast.cpp7
1 files changed, 3 insertions, 4 deletions
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) {