summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/network.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/network.c b/src/core/network.c
index 32bbc13c..07dbe477 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -212,10 +212,11 @@ GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip)
ret = connect(handle, &so.sa, SIZEOF_SOCKADDR(so));
#ifndef WIN32
- if (ret < 0 && errno != EINPROGRESS) {
+ if (ret < 0 && errno != EINPROGRESS)
#else
- if (ret < 0 && WSAGetLastError() != WSAEWOULDBLOCK) {
+ if (ret < 0 && WSAGetLastError() != WSAEWOULDBLOCK)
#endif
+ {
close(handle);
return NULL;
}