From 7da8e100ce5919ea7c0e204ce8293d949562c92d Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Wed, 11 Dec 2024 13:59:20 +0100 Subject: [PATCH] Don't overwrite the message variable. --- samples/HttpServer_WebSockets/app/application.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/HttpServer_WebSockets/app/application.cpp b/samples/HttpServer_WebSockets/app/application.cpp index 2d0a059c4c..056973520c 100644 --- a/samples/HttpServer_WebSockets/app/application.cpp +++ b/samples/HttpServer_WebSockets/app/application.cpp @@ -66,8 +66,8 @@ void wsMessageReceived(WebsocketConnection& socket, const String& message) Serial.println(message); if(message == _F("shutdown")) { - String message(F("The server is shutting down...")); - socket.broadcast(message); + String reply(F("The server is shutting down...")); + socket.broadcast(reply); shutdownServer(); return; }