diff options
author | Max Romanov <max.romanov@nginx.com> | 2021-10-28 17:46:54 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2021-10-28 17:46:54 +0300 |
commit | bba97134e983541e94cf73e93900729e3a3e61fc (patch) | |
tree | ce0322c432f1d08cd302209f1403fab112788b2c /src/nodejs/unit-http/unit.cpp | |
parent | 803e0373029a80994a85781d0b73b6cfa95bcf5a (diff) | |
download | unit-bba97134e983541e94cf73e93900729e3a3e61fc.tar.gz unit-bba97134e983541e94cf73e93900729e3a3e61fc.tar.bz2 |
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.
Diffstat (limited to '')
-rw-r--r-- | src/nodejs/unit-http/unit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nodejs/unit-http/unit.cpp b/src/nodejs/unit-http/unit.cpp index 589eca3f..ee5dc46f 100644 --- a/src/nodejs/unit-http/unit.cpp +++ b/src/nodejs/unit-http/unit.cpp @@ -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(); |