X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_setup.c;h=60fc692d1150705c85325efe74818512b08efd90;hb=b9a7444b9fa216d16d91f34d2e12f51fc4d60e46;hp=43895dda251fe87c72a2c7f8c467357305e03048;hpb=ccbe79c03b8c64432bbf1ce82dc0e123cc02bd6d;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index 43895dda..60fc692d 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -606,7 +606,7 @@ static bool add_listen_address(char *address, bool bindto) { int udp_fd = setup_vpn_in_socket((sockaddr_t *) aip->ai_addr); if(udp_fd < 0) { - close(tcp_fd); + closesocket(tcp_fd); continue; } @@ -1180,8 +1180,8 @@ void close_network_connections(void) { for(int i = 0; i < listen_sockets; i++) { io_del(&listen_socket[i].tcp); io_del(&listen_socket[i].udp); - close(listen_socket[i].tcp.fd); - close(listen_socket[i].udp.fd); + closesocket(listen_socket[i].tcp.fd); + closesocket(listen_socket[i].udp.fd); } exit_requests();