File tree Expand file tree Collapse file tree
libraries/ESP8266WebServer/examples/ServerSentEvents Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,15 +87,14 @@ void SSEKeepAlive() {
8787 if (!(subscription[i].clientIP )) {
8888 continue ;
8989 }
90- WiFiClient client = subscription[i].client ;
91- if (client.connected ()) {
90+ if (subscription[i].client .connected ()) {
9291 Serial.printf_P (PSTR (" SSEKeepAlive - client is still listening on channel %d\n " ), i);
93- client.println (F (" event: event\n data: { \" TYPE\" :\" KEEP-ALIVE\" }\n " )); // Extra newline required by SSE standard
92+ subscription[i]. client .println (F (" event: event\n data: { \" TYPE\" :\" KEEP-ALIVE\" }\n " )); // Extra newline required by SSE standard
9493 } else {
9594 Serial.printf_P (PSTR (" SSEKeepAlive - client not listening on channel %d, remove subscription\n " ), i);
9695 subscription[i].keepAliveTimer .detach ();
97- client.flush ();
98- client.stop ();
96+ subscription[i]. client .flush ();
97+ subscription[i]. client .stop ();
9998 subscription[i].clientIP = INADDR_NONE;
10099 subscriptionCount--;
101100 }
You can’t perform that action at this time.
0 commit comments