Update "now" after connect() when making outgoing connections.

It could be that address resolution takes a long time, don't let that
count against a connection. This is especially important when using a
nameserver from the VPN.

# Conflicts:
#	src/net_socket.c
This commit is contained in:
Guus Sliepen 2015-11-01 21:07:56 +01:00
parent cadbf587a0
commit 2a7871990b

View file

@ -552,6 +552,7 @@ begin:
/* Now that there is a working socket, fill in the rest and register this connection. */ /* Now that there is a working socket, fill in the rest and register this connection. */
c->last_ping_time = time(NULL);
c->status.connecting = true; c->status.connecting = true;
c->name = xstrdup(outgoing->name); c->name = xstrdup(outgoing->name);
#ifndef DISABLE_LEGACY #ifndef DISABLE_LEGACY