X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet.c;h=77e2c0ddf8bf7d71df342ccb6e7ebb6db23c3362;hb=02746165a21a4a495d0069526c9a2355110a5784;hp=a6d2bb7afc30e2425605b8dec1dabd9cabb47a2c;hpb=42e01abd54bd36ee84a45a2b646cfa27034de8d1;p=tinc diff --git a/src/net.c b/src/net.c index a6d2bb7a..77e2c0dd 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-2005 Ivo Timmermans , + 2000-2005 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); + } } } }