mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
client: make sure we get CCE if timeout on server reply
If facing a captive portal, we may seem to get a tcp level connection okay but find that communication is silently dropped, leading to us timing out in LRS_WAITING_SERVER_REPLY. If so, we need to handle it as a connection fail in order to satisfy at least Captive Portal detection.
This commit is contained in:
parent
9dbc9b9ace
commit
c3b1254747
1 changed files with 3 additions and 0 deletions
|
@ -114,6 +114,9 @@ lws_sul_wsitimeout_cb(lws_sorted_usec_list_t *sul)
|
|||
if (lwsi_state(wsi) == LRS_WAITING_SSL)
|
||||
lws_inform_client_conn_fail(wsi,
|
||||
(void *)"Timed out waiting SSL", 21);
|
||||
if (lwsi_state(wsi) == LRS_WAITING_SERVER_REPLY)
|
||||
lws_inform_client_conn_fail(wsi,
|
||||
(void *)"Timed out waiting server reply", 30);
|
||||
#endif
|
||||
|
||||
lws_context_lock(cx, __func__);
|
||||
|
|
Loading…
Add table
Reference in a new issue