Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4a1e4c2

Browse files
committed
Correctly handle connect errors
1 parent 5d3274d commit 4a1e4c2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

contrib/mmts/arbiter.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,12 @@ static int MtmConnectSocket(int node, int port)
467467
MTM_ELOG(WARNING, "Arbiter trying to connect to %s:%d: %s", host, port, strerror(errcode));
468468
goto Error;
469469
}
470-
} else {
471-
MTM_ELOG(WARNING, "Arbiter waiting socket to %s:%d: %s", host, port, strerror(errno));
470+
} else if (rc == 0) {
471+
MTM_ELOG(WARNING, "Arbiter failed to connect to socket to %s:%d within specified timeout", host, port);
472+
goto Error;
473+
} else {
474+
MTM_ELOG(WARNING, "Arbiter failed to wait socket to %s:%d: %s", host, port, strerror(errno));
475+
goto Error;
472476
}
473477
}
474478
else if (rc != 0) {

0 commit comments

Comments
 (0)