Skip to content

Commit 248be19

Browse files
committed
TcpClient - gently absorb incoming data (to free TCP resources)
1 parent 0555fb6 commit 248be19

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Firmware/RTK_Everywhere/TcpClient.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ int32_t tcpClientSendData(uint16_t dataHead)
249249
bytesToSend = dataHead - tcpClientTail;
250250
if (bytesToSend < 0)
251251
bytesToSend += settings.gnssHandlerBufferSize;
252+
253+
if(tcpClient->available())
254+
tcpClient->read(); // Gently absorb any unwanted incoming traffic
252255
}
253256

254257
// Failed to write the data

0 commit comments

Comments
 (0)