X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_socket.c;h=ce1e3aa3e65ed1091fe1400c0937b846a586a045;hb=8f9ee895224b39347783f3119343efc3bdaa3511;hp=a7c781529c16fe99f990ca0a20b26b89fbcacb93;hpb=d917c8cb6b69475d568ccbe82389b9f2b3eb5e80;p=tinc diff --git a/src/net_socket.c b/src/net_socket.c index a7c78152..ce1e3aa3 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -63,7 +63,7 @@ static void configure_tcp(connection_t *c) { unsigned long arg = 1; if(ioctlsocket(c->socket, FIONBIO, &arg) != 0) { - logger(DEBUG_ALWAYS, LOG_ERR, "ioctlsocket for %s: %d", c->hostname, sockstrerror(sockerrno)); + logger(DEBUG_ALWAYS, LOG_ERR, "ioctlsocket for %s: %s", c->hostname, sockstrerror(sockerrno)); } #endif @@ -282,7 +282,7 @@ void retry_outgoing(outgoing_t *outgoing) { outgoing->timeout = maxtimeout; timeout_set(&outgoing->ev, retry_outgoing_handler, outgoing); - event_add(&outgoing->ev, &(struct timeval){outgoing->timeout, 0}); + event_add(&outgoing->ev, &(struct timeval){outgoing->timeout, rand() % 100000}); logger(DEBUG_CONNECTIONS, LOG_NOTICE, "Trying to re-establish outgoing connection in %d seconds",