daniel has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/33319 )


Change subject: stream: Correctly close osmo_stream_cli when in state 
WAIT_RECONNECT
......................................................................

stream: Correctly close osmo_stream_cli when in state WAIT_RECONNECT

If cli is in STREAM_CLI_STATE_WAIT_RECONNECT cli->timer is scheduled.
Delete the timer if osmo_steam_cli_close() called so we don't end up
reconnecting. Also fixes the recent test failures in
master-libosmo-sccp Jenkins jobs.

Change-Id: Ic5227432192c4007f861f171ae961a8f4dea6522
---
M src/stream.c
1 file changed, 20 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/19/33319/1

diff --git a/src/stream.c b/src/stream.c
index 6fb41f1..23efe24 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -308,6 +308,12 @@
 {
        if (cli->state == STREAM_CLI_STATE_CLOSED)
                return;
+       if (cli->state == STREAM_CLI_STATE_WAIT_RECONNECT) {
+               osmo_timer_del(&cli->timer);
+               cli->state = STREAM_CLI_STATE_CLOSED;
+               return;
+       }
+
        osmo_fd_unregister(&cli->ofd);
        close(cli->ofd.fd);
        cli->ofd.fd = -1;

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33319
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic5227432192c4007f861f171ae961a8f4dea6522
Gerrit-Change-Number: 33319
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <[email protected]>
Gerrit-MessageType: newchange

Reply via email to