From 2624d22b6e55c19bc880e538153e2fd0b8651818 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 1 May 2022 15:10:58 +0200 Subject: [PATCH] [socket] Do not do exceptions in code for Win32 One set_nonblocking_fd --- src/network/socket.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/network/socket.c b/src/network/socket.c index 4d9639218..e8ed93679 100644 --- a/src/network/socket.c +++ b/src/network/socket.c @@ -350,14 +350,8 @@ sock_error: /* Set it non-blocking */ -#ifndef WIN32 if (set_nonblocking_fd(sock) < 0) goto sock_error; -#else - u_long mode = 1; - ioctlsocket(sock, FIONBIO, &mode); -#endif - /* Bind it to some port */ @@ -666,16 +660,11 @@ connect_socket(struct socket *csocket, struct connection_state state) continue; } -#ifndef WIN32 if (set_nonblocking_fd(sock) < 0) { if (errno && !saved_errno) saved_errno = errno; close(sock); continue; } -#else - u_long mode = 1; - ioctlsocket(sock, FIONBIO, &mode); -#endif #ifdef HAVE_INET_PTON if (pf == PF_INET && to_bind) {