diff --git a/src/uwsc.c b/src/uwsc.c index c5f8134..ec3969c 100644 --- a/src/uwsc.c +++ b/src/uwsc.c @@ -535,9 +535,10 @@ static void uwsc_timer_cb(struct ev_loop *loop, struct ev_timer *w, int revents) return; if (unlikely(cl->wait_pong)) { - if (now - cl->last_ping < 3) + if (now - cl->last_ping < 5) return; + cl->wait_pong = false; uwsc_log_err("ping timeout %d\n", ++cl->ntimeout); if (cl->ntimeout > 2) { uwsc_error(cl, UWSC_ERROR_PING_TIMEOUT, "ping timeout");