From 4fc99e9ce76cba860e3f91a0519e27950338157c Mon Sep 17 00:00:00 2001 From: helintongh Date: Thu, 19 Oct 2023 23:19:53 +0800 Subject: [PATCH] fix: client send ping server need reset timer --- include/cinatra/connection.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/cinatra/connection.hpp b/include/cinatra/connection.hpp index b22cb2cd..8be46ec5 100644 --- a/include/cinatra/connection.hpp +++ b/include/cinatra/connection.hpp @@ -1258,6 +1258,7 @@ class connection : public base_connection, req_.set_websocket_state(true); } break; case cinatra::ws_frame_type::WS_PING_FRAME: { + reset_timer(); auto header = ws_.format_header(payload.length(), opcode::pong); send_msg(std::move(header), std::move(payload)); } break;