Skip to content

Commit

Permalink
fix: client send ping server need reset timer
Browse files Browse the repository at this point in the history
  • Loading branch information
helintongh committed Oct 20, 2023
1 parent dbac21a commit 4fc99e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/cinatra/connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4fc99e9

Please sign in to comment.