8000 Merge pull request #326 from Stormhand/master · ViaMonkey/esp32-snippets@0a4e277 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a4e277

Browse files
authored
Merge pull request nkolban#326 from Stormhand/master
Disable timeout for WebSocket's nkolban#322
2 parents 3ec8ea4 + 744af7b commit 0a4e277

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cpp_utils/HttpServer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ class HttpServerTask: public Task {
171171

172172

173173
HttpRequest request(clientSocket); // Build the HTTP Request from the socket.
174+
if (request.isWebsocket()) { // If this is a WebSocket
175+
clientSocket.setTimeout(0); // Clear the timeout.
176+
}
174177
request.dump(); // debug.
175178
processRequest(request); // Process the request.
176179
if (!request.isWebsocket()) { // If this is NOT a WebSocket, then close it as the request

0 commit comments

Comments
 (0)
0