From ecdd0ca7749f0c8c2d948db67c1de4b0d3c3e4ed Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 27 May 2020 21:07:32 +0200 Subject: [PATCH] Ensure the flush timer is started if we never had any full packets to send. The flush timer ensures that if there is partial data left in the send buffer for framed UDP channels, that this is sent after the flush timeout. This was done correctly if we had previously sent full packets, but if there never was a full packet the timer wouldn't be started, and the small frames wouldn't be sent unless the application would send more data on the channel. --- src/utcp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utcp.c b/src/utcp.c index 8ef59a06..d068d45b 100644 --- a/src/utcp.c +++ b/src/utcp.c @@ -880,6 +880,9 @@ static void ack_unreliable_framed(struct utcp_connection *c) { // There is no partial data in the send buffer, so stop the flush timer stop_retransmit_timer(c); } + } else if(left && !timespec_isset(&c->rtrx_timeout)) { + // We have partial data and we didn't start the flush timer yet + start_flush_timer(c); } } -- 2.39.5