1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

close.c: close reason length wrong

The string length is actually 25... solve it by measuring the same
string.
This commit is contained in:
Jerry Jacobs 2019-12-12 14:23:06 +01:00 committed by Andy Green
parent 392dfe186b
commit 6879574d8d

View file

@ -451,9 +451,12 @@ just_kill_connection:
if ((lwsi_state(wsi) == LRS_WAITING_SERVER_REPLY ||
lwsi_state(wsi) == LRS_WAITING_DNS ||
lwsi_state(wsi) == LRS_WAITING_CONNECT) &&
!wsi->already_did_cce && wsi->protocol)
!wsi->already_did_cce && wsi->protocol) {
static const char _reason[] = "closed before established";
lws_inform_client_conn_fail(wsi,
(void *)"closed before established", 24);
(void *)_reason, sizeof(_reason));
}
#endif
/*