diff --git a/src/h2load.cc b/src/h2load.cc index 4eb65ebb..07a2888c 100644 --- a/src/h2load.cc +++ b/src/h2load.cc @@ -143,10 +143,8 @@ void readcb(struct ev_loop *loop, ev_io *w, int revents) { client->fail(); return; } - if (ev_is_active(&client->wev)) { - writecb(loop, &client->wev, revents); - // client->disconnect() and client->fail() may be called - } + writecb(loop, &client->wev, revents); + // client->disconnect() and client->fail() may be called } } // namespace diff --git a/src/shrpx_client_handler.cc b/src/shrpx_client_handler.cc index 04702200..c8065bb4 100644 --- a/src/shrpx_client_handler.cc +++ b/src/shrpx_client_handler.cc @@ -81,11 +81,9 @@ void readcb(struct ev_loop *loop, ev_io *w, int revents) { delete handler; return; } - if (ev_is_active(handler->get_wev())) { - if (handler->do_write() != 0) { - delete handler; - return; - } + if (handler->do_write() != 0) { + delete handler; + return; } } } // namespace diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index 41732f5e..6649eac2 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -116,12 +116,11 @@ void readcb(struct ev_loop *loop, ev_io *w, int revents) { return; } http2session->connection_alive(); - if (ev_is_active(http2session->get_wev())) { - rv = http2session->do_write(); - if (rv != 0) { - http2session->disconnect(http2session->should_hard_fail()); - return; - } + + rv = http2session->do_write(); + if (rv != 0) { + http2session->disconnect(http2session->should_hard_fail()); + return; } } } // namespace