stream: Use cli->state to check if cli is already closed
Change-Id: I92231528da08f8891e20c1226b61989a65e00ccd
This commit is contained in:
parent
a5d5b33a91
commit
a97bfa750e
|
@ -306,7 +306,7 @@ bool osmo_stream_cli_is_connected(struct osmo_stream_cli *cli)
|
|||
* 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);
|
||||
|
|
Loading…
Reference in New Issue