@@ -296,12 +296,30 @@ void ESP8266WebServerTemplate<ServerType>::handleClient() {
296
296
bool keepCurrentClient = false ;
297
297
bool callYield = false ;
298
298
299
- DBGWS (" http-server loop: conn=%d avail=%d status=%s\n " ,
300
- _currentClient.connected (), _currentClient.available (),
301
- _currentStatus==HC_NONE?" none" :
302
- _currentStatus==HC_WAIT_READ?" wait-read" :
303
- _currentStatus==HC_WAIT_CLOSE?" wait-close" :
304
- " ??" );
299
+ #ifdef DEBUG_ESP_HTTP_SERVER
300
+
301
+ struct compare_s
302
+ {
303
+ uint8_t connected;
304
+ int available;
305
+ HTTPClientStatus status;
306
+ bool operator != (const compare_s& o) { return memcmp (this , &o, sizeof (o)) != 0 ; }
307
+ };
308
+ static compare_s last { false , 0 , HC_NONE };
309
+ compare_s now = { _currentClient.connected (), _currentClient.available (), _currentStatus };
310
+
311
+ if (last != now)
312
+ {
313
+ DBGWS (" http-server loop: conn=%d avail=%d status=%s\n " ,
314
+ _currentClient.connected (), _currentClient.available (),
315
+ _currentStatus==HC_NONE?" none" :
316
+ _currentStatus==HC_WAIT_READ?" wait-read" :
317
+ _currentStatus==HC_WAIT_CLOSE?" wait-close" :
318
+ " ??" );
319
+ last = now;
320
+ }
321
+
322
+ #endif // DEBUG_ESP_HTTP_SERVER
305
323
306
324
if (_currentClient.connected () || _currentClient.available ()) {
307
325
if (_currentClient.available () && _keepAlive) {
0 commit comments