From: Guido van Rossum Date: Thu, 8 Aug 2002 20:39:30 +0000 (+0000) Subject: The other half of the patches added to SF patch 555085 by A I X-Git-Tag: v2.3c1~4606 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12e3c710db23ea9370c3bc54a5f0a2c262ffd0cc;p=python The other half of the patches added to SF patch 555085 by A I MacIntyre. At least on OS/2, a subsequent connect() on a nonblocking socket returns errno==EISCONN to indicate success. This seems harmless on Unix. --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 29b6339fe7..616c8362ee 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1327,6 +1327,8 @@ internal_connect(PySocketSockObject *s, struct sockaddr *addr, int addrlen) if (res < 0 && errno == EINPROGRESS) { internal_select(s, 1); res = connect(s->sock_fd, addr, addrlen); + if (res < 0 && errno == EISCONN) + res = 0; } }