X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=1b3d230eb4dff87b40d3e945016f9f783a3cfb71;hp=a6d2bb7afc30e2425605b8dec1dabd9cabb47a2c;hb=fe84fafcb684391739a1b3366705c58683210392;hpb=42e01abd54bd36ee84a45a2b646cfa27034de8d1 diff --git a/src/net.c b/src/net.c index a6d2bb7a..1b3d230e 100644 --- a/src/net.c +++ b/src/net.c @@ -1,7 +1,7 @@ /* net.c -- most of the network code - Copyright (C) 1998-2003 Ivo Timmermans , - 2000-2003 Guus Sliepen + Copyright (C) 1998-2004 Ivo Timmermans , + 2000-2004 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net.c,v 1.35.4.203 2003/12/20 19:47:52 guus Exp $ + $Id$ */ #include "system.h" @@ -248,7 +248,13 @@ static void check_dead_connections(void) } ifdebug(CONNECTIONS) logger(LOG_WARNING, _("Timeout from %s (%s) during authentication"), c->name, c->hostname); - terminate_connection(c, false); + if(c->status.connecting) { + c->status.connecting = false; + closesocket(c->socket); + do_outgoing_connection(c); + } else { + terminate_connection(c, false); + } } } }