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
392dfe186b
commit
6879574d8d
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue