X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_socket.c;fp=src%2Fnet_socket.c;h=c8aa78824d51b8536c975291d9b99b4e9daf311b;hp=982bc800a1ebf88860bce270a61ac562aaeec32c;hb=84b24109000ce66125038793df313205e5836b83;hpb=9235256116574927657a93944ef1b21e255e771b diff --git a/src/net_socket.c b/src/net_socket.c index 982bc800..c8aa7882 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -671,17 +671,10 @@ void setup_outgoing_connection(outgoing_t *outgoing, bool verbose) { n->address_cache = open_address_cache(n); } - if(!n->connection) { - do_outgoing_connection(outgoing); - return; - } - - logger(DEBUG_CONNECTIONS, LOG_INFO, "Already connected to %s", n->name); - - if(n->connection->outgoing) { - list_delete(&outgoing_list, outgoing); + if(n->connection) { + logger(DEBUG_CONNECTIONS, LOG_INFO, "Already connected to %s", n->name); } else { - n->connection->outgoing = outgoing; + do_outgoing_connection(outgoing); } }