From 9a5e289493541c80890700b03b93ba5a1ba91905 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Tue, 27 Jun 2017 23:36:52 +0200 Subject: [PATCH] Don't forget about outgoing connections on host file read errors. If the host config file for an outgoing connection cannot be read, or if it doesn't contain any Address, don't forget about the ConnectTo, but go straight to MaxTimeout seconds for retries. --- src/net_socket.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/net_socket.c b/src/net_socket.c index 80ae677..284bab7 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -1,7 +1,7 @@ /* net_socket.c -- Handle various kinds of sockets. Copyright (C) 1998-2005 Ivo Timmermans, - 2000-2015 Guus Sliepen + 2000-2017 Guus Sliepen 2006 Scott Lamb 2009 Florian Forster @@ -556,13 +556,20 @@ void setup_outgoing_connection(outgoing_t *outgoing) { c->outcompression = myself->connection->outcompression; init_configuration(&c->config_tree); - read_connection_config(c); + if(!read_connection_config(c)) { + free_connection(c); + outgoing->timeout = maxtimeout; + retry_outgoing(outgoing); + return; + } outgoing->cfg = lookup_config(c->config_tree, "Address"); if(!outgoing->cfg) { logger(LOG_ERR, "No address specified for %s", c->name); free_connection(c); + outgoing->timeout = maxtimeout; + retry_outgoing(outgoing); return; } -- 2.25.1