daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33254 ) Change subject: stream: Use cli->state to check if cli is already closed ...................................................................... stream: Use cli->state to check if cli is already closed Change-Id: I92231528da08f8891e20c1226b61989a65e00ccd --- M src/stream.c 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/54/33254/1 diff --git a/src/stream.c b/src/stream.c index 5f74127..a0f349c 100644 --- a/src/stream.c +++ b/src/stream.c @@ -306,7 +306,7 @@ * abstraction and close the socket */ void osmo_stream_cli_close(struct osmo_stream_cli *cli) { - if (cli->ofd.fd == -1) + if (cli->state == STREAM_CLI_STATE_CLOSED) return; osmo_fd_unregister(&cli->ofd); close(cli->ofd.fd); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33254 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I92231528da08f8891e20c1226b61989a65e00ccd Gerrit-Change-Number: 33254 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-MessageType: newchange