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:
@@ -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,
|
static void nxt_router_http_request_release(nxt_task_t *task, void *obj,
|
||||||
void *data);
|
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;
|
static nxt_router_t *nxt_router;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user