X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Fnet_socket.c;h=287d68887fde45ecaa6e4d9b4aa1b6beed054861;hb=ddc6a81a854023e38b563f213aa9a449ee91add8;hp=5394d3646c306791dcd5296401814919699f10a5;hpb=a67ab277c9fdbcfc8c0550e9046df2a00b5fed81;p=tinc diff --git a/src/net_socket.c b/src/net_socket.c index 5394d364..287d6888 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -234,7 +234,7 @@ int setup_vpn_in_socket(const sockaddr_t *sa) } static void retry_outgoing_handler(int fd, short events, void *data) { - retry_outgoing(data); + do_outgoing_connection(data); } void retry_outgoing(outgoing_t *outgoing) { @@ -261,7 +261,8 @@ void finish_connecting(connection_t *c) configure_tcp(c); - c->last_ping_time = now; + c->last_ping_time = time(NULL); + c->status.connecting = false; send_id(c); } @@ -390,7 +391,7 @@ void setup_outgoing_connection(outgoing_t *outgoing) } c->outgoing = outgoing; - c->last_ping_time = now; + c->last_ping_time = time(NULL); connection_add(c); @@ -436,7 +437,7 @@ void handle_new_meta_connection(int sock, short events, void *data) c->address = sa; c->hostname = sockaddr2hostname(&sa); c->socket = fd; - c->last_ping_time = now; + c->last_ping_time = time(NULL); ifdebug(CONNECTIONS) logger(LOG_NOTICE, _("Connection from %s"), c->hostname);