diff options
Diffstat (limited to 'src/wsocket.c')
-rw-r--r-- | src/wsocket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wsocket.c b/src/wsocket.c index 8b00fa5..2c30fbb 100644 --- a/src/wsocket.c +++ b/src/wsocket.c | |||
@@ -129,10 +129,11 @@ int sock_connect(p_sock ps, SA *addr, socklen_t len, p_tm tm) { | |||
129 | \*-------------------------------------------------------------------------*/ | 129 | \*-------------------------------------------------------------------------*/ |
130 | int sock_connected(p_sock ps, p_tm tm) { | 130 | int sock_connected(p_sock ps, p_tm tm) { |
131 | int err; | 131 | int err; |
132 | /* give windows time to find out what is up (yes, disgusting) */ | ||
132 | if ((err = sock_waitfd(ps, WAITFD_C, tm)) == IO_CLOSED) { | 133 | if ((err = sock_waitfd(ps, WAITFD_C, tm)) == IO_CLOSED) { |
133 | int len = sizeof(err); | 134 | int len = sizeof(err); |
134 | /* give windows time to set the error (yes, disgusting) */ | 135 | /* give windows time to set the error (yes, disgusting) */ |
135 | Sleep(0); | 136 | Sleep(10); |
136 | /* find out why we failed */ | 137 | /* find out why we failed */ |
137 | getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &len); | 138 | getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &len); |
138 | /* we KNOW there was an error. if 'why' is 0, we will return | 139 | /* we KNOW there was an error. if 'why' is 0, we will return |