From 6879574d8d0013362b2c22893d19181eda1e4393 Mon Sep 17 00:00:00 2001 From: Jerry Jacobs Date: Thu, 12 Dec 2019 14:23:06 +0100 Subject: [PATCH] close.c: close reason length wrong The string length is actually 25... solve it by measuring the same string. --- lib/core-net/close.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/core-net/close.c b/lib/core-net/close.c index 4d627aef4..c8893479f 100644 --- a/lib/core-net/close.c +++ b/lib/core-net/close.c @@ -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 /*