From b01fc8b4f7857738f40ee2184a996c897ed39a1e Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 27 May 2012 14:17:32 +0200 Subject: [PATCH] Handle errors. --- network_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network_cmd.c b/network_cmd.c index 2acb48f521..407486055e 100644 --- a/network_cmd.c +++ b/network_cmd.c @@ -31,7 +31,7 @@ static bool socket_nonblock(int fd) { #ifdef _WIN32 u_long mode = 1; - ioctlsocket(fd, FIONBIO, &mode); + return ioctlsocket(fd, FIONBIO, &mode) == 0; #else return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) == 0; #endif