Attention is currently required from: arehbein, laforge.
pespin 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/d542b9bc_95ba9c84
PS1, Line 9: Not sure why, but select() keeps reporting read events it seems,
: even though the client doesn't send any packets anymore.
Looks like the code was originally designed with the
idea to set the connection flag `OSMO_STREAM_SR […]
It is possible to close a
connection halfway using the shutdown() syscall (see man 2 shutdown). This also means the
other end can also do the same, which is notified through TCP FIN.
I'm right now not sure how that reflects on the socket interface though. if you
receive a FIN from the peer indicating it finished transmitting, does it announce it
somehow on the socket API? I guess in poll based system (like iofd) you simple get no READ
notifications from the socket once the Rx queue is empty, so that means you never call
read() on it (if you did, it would probably return 0?).
To close the tx side, we'd need oursleves to call shutdown() on the socket FD, which
we are not doing anywhere afaict so far.
--
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: daniel <dwillmann(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 08 Jun 2023 11:20:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment