Skip to content

Commit

Permalink
Try a more elegant solution that should decrease the TCP sending late…
Browse files Browse the repository at this point in the history
…ncy.
  • Loading branch information
slav-at-attachix committed Jul 12, 2019
1 parent 4a41eea commit 704099a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sming/Core/Network/TcpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,15 @@ void TcpClient::pushAsyncPart()
write(stream);

if(stream->isFinished()) {
flush();
debug_d("TcpClient stream finished");
freeStreams();

if(getAvailableWriteSize() > 0) {
// if there is space in the output buffer then don't wait for tcp sent confirmation but try sending more data now
onReadyToSendData(TcpConnectionEvent::eTCE_Poll);
}

flush();
}
}

Expand Down

0 comments on commit 704099a

Please sign in to comment.