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.
This commit is contained in:
Max Romanov
2019-08-30 00:07:54 +03:00
parent e2abfaf381
commit 7053a35a60

View File

@@ -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;