 
            Attention is currently required from: daniel, laforge, pespin.
arehbein 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:
(3 comments)
Patchset:
PS2: This patch didn't really introduce the (possible) issues I'm addressing here, but I think it would be better if we fixed them while we're at it
File src/stream_srv.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/34338/comment/01098932_6b4c22fa 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?
https://gerrit.osmocom.org/c/libosmo-netif/+/34338/comment/a563c839_25e5d060 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 case, the connection won't be closed as announced (I think this is a problem without this change, as well).
Also, `osmo_stream_srv_clear_tx_queue()` isn't called anywhere except in `osmo-hnbgw.git:src/osmo-hnbgw/hnbgw.c` on connection restart (or something among those lines) as far as I can tell, so if messages can't be sent out and `OSMO_STREAM_SRV_F_FLUSH_DESTROY` is set, then it looks like we will have some sort of endless loop here.
