From ac0ab72aa69853dccc8ae048ca7888ed2f95a7de Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 27 May 2020 21:00:32 +0200 Subject: [PATCH] Ensure the poll callback is called when a channel is fully established. The optimization that reduced how often the poll callback is called when the application did not write anything to the channel in the callback also inadvertently stopped it from being called right when the channel is fully established. --- src/utcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utcp.c b/src/utcp.c index 2a1ac5b8..cbc094a1 100644 --- a/src/utcp.c +++ b/src/utcp.c @@ -677,6 +677,7 @@ void utcp_accept(struct utcp_connection *c, utcp_recv_t recv, void *priv) { debug(c, "accepted %p %p\n", c, recv, priv); c->recv = recv; c->priv = priv; + c->do_poll = true; set_state(c, ESTABLISHED); } @@ -2025,6 +2026,7 @@ skip_ack: c->snd.last++; set_state(c, FIN_WAIT_1); } else { + c->do_poll = true; set_state(c, ESTABLISHED); } -- 2.39.5