Moving request limit control to libunit.

Introducting application graceful stop.  For now only used when application
process reach request limit value.

This closes #585 issue on GitHub.
This commit is contained in:
Max Romanov
2021-10-28 17:46:54 +03:00
parent 803e037302
commit bba97134e9
24 changed files with 273 additions and 248 deletions

View File

@@ -519,11 +519,11 @@ Unit::add_port(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port)
void
Unit::remove_port(nxt_unit_t *unit, nxt_unit_port_t *port)
Unit::remove_port(nxt_unit_t *unit, nxt_unit_ctx_t *ctx, nxt_unit_port_t *port)
{
port_data_t *data;
if (port->data != NULL) {
if (port->data != NULL && ctx != NULL) {
data = (port_data_t *) port->data;
data->stop();