summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_http_websocket.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/res/res_http_websocket.c b/res/res_http_websocket.c
index 07cb6b7be..744521507 100644
--- a/res/res_http_websocket.c
+++ b/res/res_http_websocket.c
@@ -757,8 +757,13 @@ int AST_OPTIONAL_API_NAME(ast_websocket_uri_cb)(struct ast_tcptls_session_instan
protocol_handler->callback(session, get_vars, headers);
ao2_ref(protocol_handler, -1);
- /* By dropping the FILE* from the session it won't get closed when the HTTP server cleans up */
+ /*
+ * By dropping the FILE* and fd from the session the connection
+ * won't get closed when the HTTP server cleans up because we
+ * passed the connection to the protocol handler.
+ */
ser->f = NULL;
+ ser->fd = -1;
return 0;
}