Attention is currently required from: laforge.
arehbein has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmo-netif/+/33196 )
Change subject: stream: Fix endless loop on server on client disconnect
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/libosmo-netif/+/33196/comment/341dc159_f4f5abc0
PS1, Line 9: Not sure why, but select() keeps reporting read events it seems,
: even though the client doesn't send any packets anymore.
it sounds like the normal semantics of a dead socket:
readable, but length of read() returns 0. […]
Looks like the code was originally
designed with the idea to set the connection flag `OSMO_STREAM_SRV_F_FLUSH_DESTROY`, allow
all messages to be sent and only then destroy the connection.
So the server gets stuck, because the condition `if (osmo_iofd_txqueue_len(iofd) == 0)` is
never met on subsequent iterations, i.e. the messages don't all get sent out for
whatever reason.
Is it actually possible, that the socket is `read()`-dead, but messages can still be sent
out on the connection?
If not, maybe we can simplify the code and do away with the condition check mentioned
above, instead of destroying the connection on the next call to this function.
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-netif/+/33196
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I012ddf14ae17642a52d34026d85ab6958cf488a1
Gerrit-Change-Number: 33196
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 08 Jun 2023 11:06:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment