Attention is currently required from: arehbein, laforge, pespin.
daniel has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmo-netif/+/34338?usp=email )
Change subject: stream_srv: Fix connection error handling
......................................................................
Patch Set 2:
(2 comments)
File src/stream_srv.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/34338/comment/3cb40480_27675525
PS2, Line 489: if (OSMO_UNLIKELY(res <= 0)) {
Why do we not call `osmo_stream_srv_clear_tx_queue()`
here, if the connection is dead anyways?
Because that's what
osmo_stream_srv_destroy() does already (either through msgb_queue_free() or
osmo_iofd_free())
https://gerrit.osmocom.org/c/libosmo-netif/+/34338/comment/ff657801_7ece556d
PS2, Line 496: if (osmo_iofd_txqueue_len(iofd) == 0)
Can it not happen that messages can't be sent out,
so that this condition never holds true? In that […]
I just noticed that
osmo_stream_srv_clear_tx_queue() is not aware of osmo_io. I'll prepare a patch.
We only end up here if there's actual data to be read, so it's not really an
endless loop.
The only way where a message is never sent out is if the fd never is writable. Even if
sending then fails that message has been removed from the tx queue so it will eventually
be empty.
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-netif/+/34338?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I84eea2717f3762830f3f5b115e6fc8545eaa4fd5
Gerrit-Change-Number: 34338
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: arehbein <arehbein(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 28 Sep 2023 14:43:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Gerrit-MessageType: comment