@@ -346,12 +346,9 @@ void tcpServerClientUpdate(uint8_t index)
346
346
347
347
// Periodically display this client connection
348
348
if (PERIODIC_DISPLAY (PD_TCP_SERVER_DATA) && (!inMainMenu))
349
- {
350
- PERIODIC_CLEAR (PD_TCP_SERVER_DATA);
351
349
systemPrintf (" %s client %d connected to %s\r\n " ,
352
350
tcpServerName, index,
353
351
tcpServerClientIpAddress[index].toString ().c_str ());
354
- }
355
352
break ;
356
353
}
357
354
@@ -371,14 +368,10 @@ void tcpServerClientUpdate(uint8_t index)
371
368
// TCP server client found
372
369
// Start processing the new TCP server client connection
373
370
tcpServerClientIpAddress[index] = tcpServerClient[index]->remoteIP ();
374
-
375
371
if ((settings.debugTcpServer || PERIODIC_DISPLAY (PD_TCP_SERVER_DATA)) && (!inMainMenu))
376
- {
377
- PERIODIC_CLEAR (PD_TCP_SERVER_DATA);
378
372
systemPrintf (" %s client %d connected to %s\r\n " ,
379
373
tcpServerName, index,
380
374
tcpServerClientIpAddress[index].toString ().c_str ());
381
- }
382
375
383
376
// If we are acting as an NTRIP Caster, intercept the initial communication from the client
384
377
// and respond accordingly
@@ -550,8 +543,6 @@ void tcpServerStopClient(int index)
550
543
// Done with this client connection
551
544
if ((settings.debugTcpServer || PERIODIC_DISPLAY (PD_TCP_SERVER_DATA)) && (!inMainMenu))
552
545
{
553
- PERIODIC_CLEAR (PD_TCP_SERVER_DATA);
554
-
555
546
// Determine the shutdown reason
556
547
connected = tcpServerClient[index]->connected ()
557
548
&& (!(tcpServerClientWriteError & (1 << index)));
@@ -664,21 +655,19 @@ void tcpServerUpdate()
664
655
if (connected == false )
665
656
{
666
657
if ((settings.debugTcpServer || PERIODIC_DISPLAY (PD_TCP_SERVER_DATA)) && (!inMainMenu))
667
- {
668
- PERIODIC_CLEAR (PD_TCP_SERVER_DATA);
669
658
systemPrintf (" %s initiating shutdown\r\n " , tcpServerName);
670
- }
671
659
672
660
// Network connection failed, attempt to restart the network
673
661
tcpServerStop ();
662
+ if (PERIODIC_DISPLAY (PD_TCP_SERVER_DATA))
663
+ PERIODIC_CLEAR (PD_TCP_SERVER_DATA);
674
664
break ;
675
665
}
676
666
677
667
// Walk the list of TCP server clients
678
668
for (index = 0 ; index < TCP_SERVER_MAX_CLIENTS; index++)
679
- {
680
669
tcpServerClientUpdate (index);
681
- }
670
+ PERIODIC_CLEAR (PD_TCP_SERVER_DATA);
682
671
683
672
// Check for data moving across the connections
684
673
if ((millis () - tcpServerTimer) >= TCP_SERVER_CLIENT_DATA_TIMEOUT)
0 commit comments