aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/osmo_io_poll.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/osmo_io_poll.c')
-rw-r--r--src/core/osmo_io_poll.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/osmo_io_poll.c b/src/core/osmo_io_poll.c
index bc203c0c..dd86f29b 100644
--- a/src/core/osmo_io_poll.c
+++ b/src/core/osmo_io_poll.c
@@ -110,7 +110,15 @@ static void iofd_poll_ofd_cb_recvmsg_sendmsg(struct osmo_fd *ofd, unsigned int w
talloc_free(msghdr);
msgb_free(msg);
+ } else {
+ if (iofd->mode == OSMO_IO_FD_MODE_READ_WRITE)
+ /* Socket is writable, but we have no data to send. A non-blocking/async
+ connect() is signalled this way. */
+ iofd->io_ops.write_cb(iofd, 0, NULL);
+ if (osmo_iofd_txqueue_len(iofd) == 0)
+ iofd_poll_ops.write_disable(iofd);
}
+
}
}