]> git.meshlink.io Git - meshlink/blobdiff - src/utcp.c
Ensure the flush timer is started if we never had any full packets to send.
[meshlink] / src / utcp.c
index 8ef59a063fdf8f3af5a1fbb021deced7775c7e73..d068d45b20ccd01d4f9e1b43f01e7becac95cdc3 100644 (file)
@@ -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);
        }
 }