41a42,43 > static void nxt_py_asgi_http_set_result(nxt_py_asgi_http_t *http, > PyObject *future, PyObject *msg); 468c470 < PyObject *msg, *future, *res; --- > PyObject *msg, *future; 487c489,501 < res = PyObject_CallMethodObjArgs(future, nxt_py_set_result_str, msg, NULL); --- > nxt_py_asgi_http_set_result(http, future, msg); > > Py_DECREF(msg); > } > > > static void > nxt_py_asgi_http_set_result(nxt_py_asgi_http_t *http, PyObject *future, > PyObject *msg) > { > PyObject *res; > > res = PyObject_CallMethodObjArgs(future, nxt_py_done_str, NULL); 489c503 < nxt_unit_req_alert(http->req, "'set_result' call failed"); --- > nxt_unit_req_alert(http->req, "'done' call failed"); 492a507,518 > if (nxt_fast_path(res == Py_False)) { > res = PyObject_CallMethodObjArgs(future, nxt_py_set_result_str, msg, > NULL); > if (nxt_slow_path(res == NULL)) { > nxt_unit_req_alert(http->req, "'set_result' call failed"); > nxt_python_print_exception(); > } > > } else { > res = NULL; > } > 495,496d520 < < Py_DECREF(msg); 503c527 < PyObject *msg, *future, *res; --- > PyObject *msg, *future; 527,531c551 < res = PyObject_CallMethodObjArgs(future, nxt_py_set_result_str, msg, NULL); < if (nxt_slow_path(res == NULL)) { < nxt_unit_req_alert(req, "'set_result' call failed"); < nxt_python_print_exception(); < } --- > nxt_py_asgi_http_set_result(http, future, msg); 533,535d552 < Py_XDECREF(res); < Py_DECREF(future); < 578,583c595 < res = PyObject_CallMethodObjArgs(future, nxt_py_set_result_str, Py_None, < NULL); < if (nxt_slow_path(res == NULL)) { < nxt_unit_req_alert(http->req, "'set_result' call failed"); < nxt_python_print_exception(); < } --- > nxt_py_asgi_http_set_result(http, future, Py_None); 585,587d596 < Py_XDECREF(res); < Py_DECREF(future); <