86a768ee3c
SVN-Revision: 13094
21 lines
786 B
Diff
21 lines
786 B
Diff
--- a/src/socketlib.c
|
|
+++ b/src/socketlib.c
|
|
@@ -390,15 +390,13 @@ int socket_is_data_readable(int s, int t
|
|
wput_socket * socket_timeout_connect(wput_socket * sock, struct sockaddr *remote_addr, size_t size, int timeout) {
|
|
int c = 0;
|
|
printout(vDEBUG, "initiating timeout connect (%d)\n", timeout);
|
|
-#ifdef WIN32
|
|
/* reset errno before connecting. otherwise connection might "fail" for:
|
|
* no such file or directory ;) */
|
|
errno = 0;
|
|
-#endif
|
|
- socket_set_blocking(sock->fd, 0);
|
|
+ socket_set_blocking(sock->fd, 1);
|
|
c = connect(sock->fd,remote_addr,size);
|
|
if(errno > 0 && errno != 115 && errno != 36) {
|
|
- printout(vMORE, "[%s]", strerror(errno));
|
|
+ printout(vMORE, "[%d:%s] ", errno, strerror(errno));
|
|
return NULL;
|
|
}
|
|
/* DEBUG if(c == -1) perror("connect"); */
|