Content-Length: 266095 | pFad | http://github.com/postgrespro/postgres_cluster/commit/b85c8af760a2afd990b5b9255f84b2fce02499ac

7B Correctly handle connect errors · postgrespro/postgres_cluster@b85c8af · GitHub
Skip to content

Commit b85c8af

Browse files
knizhnikkelvich
authored andcommitted
Correctly handle connect errors
1 parent 34f64ad commit b85c8af

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

arbiter.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,12 @@ static int MtmConnectSocket(int node, int port)
473473
MTM_ELOG(WARNING, "Arbiter trying to connect to %s:%d: %s", host, port, strerror(errcode));
474474
goto Error;
475475
}
476-
} else {
477-
MTM_ELOG(WARNING, "Arbiter waiting socket to %s:%d: %s", host, port, strerror(errno));
476+
} else if (rc == 0) {
477+
MTM_ELOG(WARNING, "Arbiter failed to connect to socket to %s:%d within specified timeout", host, port);
478+
goto Error;
479+
} else {
480+
MTM_ELOG(WARNING, "Arbiter failed to wait socket to %s:%d: %s", host, port, strerror(errno));
481+
goto Error;
478482
}
479483
}
480484
else if (rc != 0) {

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/b85c8af760a2afd990b5b9255f84b2fce02499ac

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy