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-18 14:45:31 +00:00 committed by Andy Green
parent f4f4d25faa
commit 9f9dba9f20

View file

@ -376,9 +376,12 @@ just_kill_connection:
#if !defined(LWS_NO_CLIENT)
if ((lwsi_state(wsi) == LRS_WAITING_SERVER_REPLY ||
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
/*