diff --git a/src/main.cpp b/src/main.cpp index d22cb38..34ff252 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,12 +28,12 @@ unsigned long lastStatusTime = 0; void sendActionMessage(bool state) { if ( DEBUG ) Serial.println("Action button triggered"); String msgURL = actionURL + (state ? "true" : "false"); + WiFiClient client; HTTPClient http; if ( BOARD == "ESP32" ) { msgURL = "http://" + hostAddress + ":" + String(hostPort) + msgURL; http.begin(msgURL.c_str()); } else { - WiFiClient client; http.begin(client, hostAddress.c_str(), hostPort, msgURL.c_str()); } http.GET();