nghttpx, h2load: Perform write whenever read succeeds
This commit is contained in:
parent
3fd5d0af79
commit
6f58434d89
|
@ -143,11 +143,9 @@ void readcb(struct ev_loop *loop, ev_io *w, int revents) {
|
||||||
client->fail();
|
client->fail();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ev_is_active(&client->wev)) {
|
|
||||||
writecb(loop, &client->wev, revents);
|
writecb(loop, &client->wev, revents);
|
||||||
// client->disconnect() and client->fail() may be called
|
// client->disconnect() and client->fail() may be called
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
Client::Client(Worker *worker, size_t req_todo)
|
Client::Client(Worker *worker, size_t req_todo)
|
||||||
|
|
|
@ -81,13 +81,11 @@ void readcb(struct ev_loop *loop, ev_io *w, int revents) {
|
||||||
delete handler;
|
delete handler;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ev_is_active(handler->get_wev())) {
|
|
||||||
if (handler->do_write() != 0) {
|
if (handler->do_write() != 0) {
|
||||||
delete handler;
|
delete handler;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -116,14 +116,13 @@ void readcb(struct ev_loop *loop, ev_io *w, int revents) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
http2session->connection_alive();
|
http2session->connection_alive();
|
||||||
if (ev_is_active(http2session->get_wev())) {
|
|
||||||
rv = http2session->do_write();
|
rv = http2session->do_write();
|
||||||
if (rv != 0) {
|
if (rv != 0) {
|
||||||
http2session->disconnect(http2session->should_hard_fail());
|
http2session->disconnect(http2session->should_hard_fail());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
Loading…
Reference in New Issue