Skip to content

Commit ff5a3aa

Browse files
committed
verbose-debug-1
1 parent f98e296 commit ff5a3aa

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/roles/ws/ops-ws.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ rops_handle_POLLIN_ws(struct lws_context_per_thread *pt, struct lws *wsi,
10121012
unsigned int pending = 0;
10131013
struct lws_tokens ebuf;
10141014
char buffered = 0;
1015-
int n = 0, m, sanity = 100;
1015+
int n = 0, m, sanity = 10000;
10161016

10171017
if (!wsi->ws) {
10181018
lwsl_err("ws role wsi with no ws\n");
@@ -1316,10 +1316,14 @@ rops_handle_POLLIN_ws(struct lws_context_per_thread *pt, struct lws *wsi,
13161316
}
13171317
#endif
13181318
} else {
1319+
static lws_log_ratelimit_t rl = { 0, 0 };
13191320
/*
13201321
* Something has gone wrong, we are spinning...
13211322
* let's bail on this connection
13221323
*/
1324+
lwsl_ratelimit_err(&rl, 1 * LWS_US_PER_SEC,
1325+
"ws %s: dropping connection due to sanity loop limit\n",
1326+
lws_wsi_tag(wsi));
13231327
return LWS_HPI_RET_PLEASE_CLOSE_ME;
13241328
}
13251329
}

0 commit comments

Comments
 (0)