Return PONG in response to PING

Signed-off-by: Carsten Schafer <Carsten.Schafer@kinarasystems.com>
This commit is contained in:
Carsten Schafer
2025-08-26 09:09:52 -04:00
parent 42c421ec12
commit aeef70a121
2 changed files with 3 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ namespace OpenWifi {
fmt::format("TELEMETRY-WS-PING({}): received. PONG sent back.", CId_));
WS_->sendFrame("", 0,
(int)Poco::Net::WebSocket::FRAME_OP_PONG |
(int)Poco::Net::WebSocket::FRAME_FLAG_FIN);
(int)Poco::Net::WebSocket::FRAME_FLAG_FIN);
} else if (Op == Poco::Net::WebSocket::FRAME_OP_CLOSE) {
poco_information(Logger(),
fmt::format("TELEMETRY-DISCONNECT({}): device wants to disconnect.", CId_));

View File

@@ -610,8 +610,8 @@ namespace OpenWifi {
case Poco::Net::WebSocket::FRAME_OP_PING: {
Connection->WSSocket_->sendFrame("", 0,
(int) Poco::Net::WebSocket::FRAME_FLAG_FIN |
(int) Poco::Net::WebSocket::FRAME_OP_BINARY);
(int)Poco::Net::WebSocket::FRAME_OP_PONG |
(int)Poco::Net::WebSocket::FRAME_OP_BINARY);
} break;
case Poco::Net::WebSocket::FRAME_OP_PONG: {