nxt_python_asgi_websocket.c (1681:542b5b8c0647) nxt_python_asgi_websocket.c (1980:43553aa72111)
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6
7#include <python/nxt_python.h>
8

--- 966 unchanged lines hidden (view full) ---

975{
976 PyObject *msg, *exc;
977 nxt_py_asgi_websocket_t *ws;
978
979 ws = req->data;
980
981 nxt_unit_req_debug(req, "asgi_websocket_close_handler");
982
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6
7#include <python/nxt_python.h>
8

--- 966 unchanged lines hidden (view full) ---

975{
976 PyObject *msg, *exc;
977 nxt_py_asgi_websocket_t *ws;
978
979 ws = req->data;
980
981 nxt_unit_req_debug(req, "asgi_websocket_close_handler");
982
983 if (nxt_slow_path(ws == NULL)) {
984 return;
985 }
986
983 if (ws->receive_future == NULL) {
984 ws->state = NXT_WS_DISCONNECTED;
985
986 return;
987 }
988
989 msg = nxt_py_asgi_websocket_disconnect_msg(ws);
990 if (nxt_slow_path(msg == NULL)) {

--- 97 unchanged lines hidden ---
987 if (ws->receive_future == NULL) {
988 ws->state = NXT_WS_DISCONNECTED;
989
990 return;
991 }
992
993 msg = nxt_py_asgi_websocket_disconnect_msg(ws);
994 if (nxt_slow_path(msg == NULL)) {

--- 97 unchanged lines hidden ---