From 503105a9fec1144755df0b5bee4b00444a602d57 Mon Sep 17 00:00:00 2001 From: Hasenradball Date: Fri, 5 Jan 2024 17:24:45 +0100 Subject: [PATCH] Remove compiler warnings (#854) * [Prevent unwanted Compiler Warnings]: Issue #772 --- src/WebSockets.cpp | 2 +- src/WebSocketsServer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WebSockets.cpp b/src/WebSockets.cpp index 694aec2..2d3a254 100644 --- a/src/WebSockets.cpp +++ b/src/WebSockets.cpp @@ -750,7 +750,7 @@ void WebSockets::handleHBTimeout(WSclient_t * client) { client->pongTimeoutCount++; client->lastPing = millis() - client->pingInterval - 500; // force ping on the next run - DEBUG_WEBSOCKETS("[HBtimeout] pong TIMEOUT! lp=%d millis=%d pi=%d count=%d\n", client->lastPing, millis(), pi, client->pongTimeoutCount); + DEBUG_WEBSOCKETS("[HBtimeout] pong TIMEOUT! lp=%d millis=%lu pi=%d count=%d\n", client->lastPing, millis(), pi, client->pongTimeoutCount); if(client->disconnectTimeoutCount && client->pongTimeoutCount >= client->disconnectTimeoutCount) { DEBUG_WEBSOCKETS("[HBtimeout] count=%d, DISCONNECTING\n", client->pongTimeoutCount); diff --git a/src/WebSocketsServer.cpp b/src/WebSocketsServer.cpp index 4a0b413..e11e1cf 100644 --- a/src/WebSocketsServer.cpp +++ b/src/WebSocketsServer.cpp @@ -655,7 +655,7 @@ void WebSocketsServer::handleNewClients(void) { #endif // store new connection - WEBSOCKETS_NETWORK_CLASS * tcpClient = new WEBSOCKETS_NETWORK_CLASS(_server->available()); + WEBSOCKETS_NETWORK_CLASS * tcpClient = new WEBSOCKETS_NETWORK_CLASS(_server->accept()); if(!tcpClient) { DEBUG_WEBSOCKETS("[WS-Client] creating Network class failed!"); return;