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/python/nxt_python_asgi_websocket.c | |
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 'src/python/nxt_python_asgi_websocket.c')
-rw-r--r-- | src/python/nxt_python_asgi_websocket.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/python/nxt_python_asgi_websocket.c b/src/python/nxt_python_asgi_websocket.c index fc7d9fa4..ab1d0324 100644 --- a/src/python/nxt_python_asgi_websocket.c +++ b/src/python/nxt_python_asgi_websocket.c @@ -980,6 +980,10 @@ nxt_py_asgi_websocket_close_handler(nxt_unit_request_info_t *req) nxt_unit_req_debug(req, "asgi_websocket_close_handler"); + if (nxt_slow_path(ws == NULL)) { + return; + } + if (ws->receive_future == NULL) { ws->state = NXT_WS_DISCONNECTED; |