Klaus Demo nginx / f878492
HTTP/2: fixed possible alert about left open socket on shutdown. This could happen when graceful shutdown configured by worker_shutdown_timeout times out and is then followed by another timeout such as proxy_read_timeout. In this case, the HEADERS frame is added to the output queue, but attempt to send it fails (due to c->error forcibly set during graceful shutdown timeout). This triggers request finalization which attempts to close the stream. But the stream cannot be closed because there is a frame in the output queue, and the connection cannot be finalized. This leaves the connection open without any timer events leading to alert. The fix is to post write event when sending output queue fails on c->error. That will finalize the connection. Ruslan Ermilov 1 year, 4 months ago
1 changed file(s) with 3 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
512512 ngx_http_core_loc_conf_t *clcf;
513513
514514 c = h2c->connection;
515 wev = c->write;
515516
516517 if (c->error) {
517 return NGX_ERROR;
518 }
519
520 wev = c->write;
518 goto error;
519 }
521520
522521 if (!wev->ready) {
523522 return NGX_AGAIN;