path: root/src/stream.c
diff options
authorPau Espin Pedrol <pespin@sysmocom.de>2018-04-05 18:07:39 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-04-05 18:07:41 +0200
commitc71c9516ddff9d5e724401b97e8f134f3b5f1867 (patch)
tree77125bfb6ae184058a30a9f01be394f7dd9cd6ad /src/stream.c
parent9d726d0e56665b4439bb4efe782be06be2e83ffb (diff)
stream.c: osmo_stream_cli_open2: Remove wrong assumption in reconnect decision
Documentation of osmo_sock_init2 doesn't provide information of any specific value of errno set/expected after running the function. It is incorrect to expect a specific value of errno and looking at the implementation it is actually not a good idea to check it. If reconnect flag is set, let's reconnect always instead of looking at errno to decide. Change-Id: I25b33f4cdc496ae31ff240d445b9b2805091845c
Diffstat (limited to 'src/stream.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stream.c b/src/stream.c
index 78dafd5..9dcb94b 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -453,7 +453,7 @@ int osmo_stream_cli_open2(struct osmo_stream_cli *cli, int reconnect)
cli->addr, cli->port,
if (ret < 0) {
- if (reconnect && errno == ECONNREFUSED)
+ if (reconnect)
return ret;