aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/websocket/websocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/supplemental/websocket/websocket.c')
-rw-r--r--src/supplemental/websocket/websocket.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/supplemental/websocket/websocket.c b/src/supplemental/websocket/websocket.c
index e7372a49..3dfb3e8e 100644
--- a/src/supplemental/websocket/websocket.c
+++ b/src/supplemental/websocket/websocket.c
@@ -1604,11 +1604,7 @@ ws_handler(nni_aio *aio)
goto err;
}
- if (nni_http_res_set_status(res, NNG_HTTP_STATUS_SWITCHING) != 0) {
- nni_http_res_free(res);
- status = NNG_HTTP_STATUS_INTERNAL_SERVER_ERROR;
- goto err;
- }
+ nni_http_res_set_status(res, NNG_HTTP_STATUS_SWITCHING);
if ((SETH("Connection", "Upgrade") != 0) ||
(SETH("Upgrade", "websocket") != 0) ||