tcp: actually send finish when needed by the state

fix #18327 after hrev57546

Change-Id: I352a325f3c2068d06996c278246f7a30f5bfcbe0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7504
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Jérôme Duval 2024-03-04 16:55:26 +01:00 committed by waddlesplash
parent 35718d84c3
commit 49d736ca2a

View File

@ -2213,7 +2213,7 @@ TCPEndpoint::_SendQueued(bool force)
sendWindow -= consumedWindow;
uint32 length = min_c(fSendQueue.Available(fSendNext), sendWindow);
if (length == 0) {
if (length == 0 && !state_needs_finish(fState)) {
// Nothing to send.
return B_OK;
}