1. Exit when we cannot create incoming connection.
2. Improve logging to inform which connection can't be created. Submitted by: [1] Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
This commit is contained in:
parent
fcc8d2e17b
commit
1dd5a4bfa2
@ -511,7 +511,8 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
|
|||||||
|
|
||||||
/* Prepare outgoing connection with remote node. */
|
/* Prepare outgoing connection with remote node. */
|
||||||
if (proto_client(res->hr_remoteaddr, &out) < 0) {
|
if (proto_client(res->hr_remoteaddr, &out) < 0) {
|
||||||
primary_exit(EX_TEMPFAIL, "Unable to create connection to %s",
|
primary_exit(EX_TEMPFAIL,
|
||||||
|
"Unable to create outgoing connection to %s",
|
||||||
res->hr_remoteaddr);
|
res->hr_remoteaddr);
|
||||||
}
|
}
|
||||||
/* Try to connect, but accept failure. */
|
/* Try to connect, but accept failure. */
|
||||||
@ -577,7 +578,8 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
|
|||||||
* Setup incoming connection with remote node.
|
* Setup incoming connection with remote node.
|
||||||
*/
|
*/
|
||||||
if (proto_client(res->hr_remoteaddr, &in) < 0) {
|
if (proto_client(res->hr_remoteaddr, &in) < 0) {
|
||||||
pjdlog_errno(LOG_WARNING, "Unable to create connection to %s",
|
primary_exit(EX_TEMPFAIL,
|
||||||
|
"Unable to create incoming connection to %s",
|
||||||
res->hr_remoteaddr);
|
res->hr_remoteaddr);
|
||||||
}
|
}
|
||||||
/* Try to connect, but accept failure. */
|
/* Try to connect, but accept failure. */
|
||||||
|
Loading…
Reference in New Issue
Block a user