diff options
Diffstat (limited to 'src/stream.c')
-rw-r--r-- | src/stream.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/stream.c b/src/stream.c index 74fe8b6..e9307a5 100644 --- a/src/stream.c +++ b/src/stream.c @@ -283,7 +283,12 @@ static int osmo_stream_cli_fd_cb(struct osmo_fd *ofd, unsigned int what) osmo_stream_cli_reconnect(cli); return 0; } - ofd->when &= ~BSC_FD_WRITE; + + /* If messages got enqueued while 'connecting', keep WRITE flag + up to dispatch them upon next main loop step */ + if (llist_empty(&cli->tx_queue)) + cli->ofd.when &= ~BSC_FD_WRITE; + LOGSCLI(cli, LOGL_DEBUG, "connection done.\n"); cli->state = STREAM_CLI_STATE_CONNECTED; if (cli->proto == IPPROTO_SCTP) { |