Browse Source

[core] remove fd interest if create_env returns

remove fd interest in FDEVENT_OUT to backend if create_env hook returns
a status that is not HANDLER_GO_ON, HANDLER_FINISHED, or HANDLER_ERROR
(e.g. HANDLER_WAIT_FOR_EVENT or HANDLER_WAIT_FOR_FD or HANDLER_COMEBACK)
personal/stbuehler/cleanup-build
Glenn Strauss 4 years ago
parent
commit
a4d40da9f2
  1. 7
      src/gw_backend.c

7
src/gw_backend.c

@ -1793,7 +1793,12 @@ static handler_t gw_write_request(server *srv, gw_handler_ctx *hctx) {
{
handler_t rc = hctx->create_env(srv, hctx);
if (HANDLER_GO_ON != rc) return rc;
if (HANDLER_GO_ON != rc) {
if (HANDLER_FINISHED != rc && HANDLER_ERROR != rc)
fdevent_event_clr(srv->ev, &(hctx->fde_ndx), hctx->fd,
FDEVENT_OUT);
return rc;
}
}
/*(disable Nagle algorithm if streaming and content-length unknown)*/

Loading…
Cancel
Save