- fprintf(stderr, "errno=%d[%s] tmpadd=%x\n",
- errno, strerror(errno), tmpadd);
- throw Pipe::Error("could not connect to socket");
+#ifdef WIN32
+ if (WSAGetLastError() != WSAEWOULDBLOCK)
+ throw Pipe::Error("could not connect to socket");
+#else
+ if (errno != EINPROGRESS)
+ throw Pipe::Error("could not connect to socket");
+#endif