X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_socket.c;h=fb776f89fc649edd94bd73dceecdbd64b34152b5;hp=ab2d79d2af5037269e7fa22f92c4ddc0da8cf8dc;hb=228e7a5c8f0e517dcede50f886965a44fca39853;hpb=a5a4d2b865879b8694760c0a5b5909c9a3675027 diff --git a/src/net_socket.c b/src/net_socket.c index ab2d79d2..fb776f89 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -46,7 +46,6 @@ int addressfamily = AF_UNSPEC; int maxtimeout = 900; int seconds_till_retry = 5; -bool blockingtcp = false; listen_socket_t listen_socket[MAXSOCKETS]; int listen_sockets; @@ -58,12 +57,10 @@ static void configure_tcp(connection_t *c) int option; #ifdef O_NONBLOCK - if(!blockingtcp) { - int flags = fcntl(c->socket, F_GETFL); + int flags = fcntl(c->socket, F_GETFL); - if(fcntl(c->socket, F_SETFL, flags | O_NONBLOCK) < 0) { - logger(LOG_ERR, _("fcntl for %s: %s"), c->hostname, strerror(errno)); - } + if(fcntl(c->socket, F_SETFL, flags | O_NONBLOCK) < 0) { + logger(LOG_ERR, _("fcntl for %s: %s"), c->hostname, strerror(errno)); } #endif