nghttpx: Feed read event rather than calling on_read
on_read may fail, but we failed to check its return value most of the places. This is because failure means deletion of ClientHandler, but because of architecture, we cannot delete it. Feeding read event is better since we can move call on_read from libev callback. We can delete ClientHandler form there.
This commit is contained in:
parent
841ac75c3e
commit
3d20c2dce6
|
@ -699,7 +699,10 @@ int HttpsUpstream::resume_read(IOCtrlReason reason, Downstream *downstream,
|
|||
// Process remaining data in input buffer here because these bytes
|
||||
// are not notified by readcb until new data arrive.
|
||||
http_parser_pause(&htp_, 0);
|
||||
return on_read();
|
||||
|
||||
auto conn = handler_->get_connection();
|
||||
ev_feed_event(conn->loop, &conn->rev, EV_READ);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue