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.
debug(c, "accepted %p %p\n", c, recv, priv);
c->recv = recv;
c->priv = priv;
+ c->do_poll = true;
set_state(c, ESTABLISHED);
}
c->snd.last++;
set_state(c, FIN_WAIT_1);
} else {
+ c->do_poll = true;
set_state(c, ESTABLISHED);
}