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:
parent
f4f4d25faa
commit
9f9dba9f20
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue