From 7053a35a60bdacdfcf1277dd8f08f6c46c8028c7 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Fri, 30 Aug 2019 00:07:54 +0300 Subject: Fixed WebSocket implementation that was broken on some systems. The "nxt_http_websocket" request state, defined in "nxt_http_websocket.c", is used in "nxt_router.c" and must be linked with external symbol declared in "nxt_router.c". Due to the missing "extern" keyword, building Unit with some linkers (notably gold and LLD) caused WebSocket connections to get stuck or even crash the router process. --- src/nxt_router.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nxt_router.c b/src/nxt_router.c index c3bcc51c..89ea5fe6 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -247,7 +247,7 @@ static nxt_int_t nxt_router_http_request_done(nxt_task_t *task, static void nxt_router_http_request_release(nxt_task_t *task, void *obj, void *data); -const nxt_http_request_state_t nxt_http_websocket; +extern const nxt_http_request_state_t nxt_http_websocket; static nxt_router_t *nxt_router; -- cgit