summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-08 20:39:30 (GMT)
committerGuido van Rossum <guido@python.org>2002-08-08 20:39:30 (GMT)
commit12e3c710db23ea9370c3bc54a5f0a2c262ffd0cc (patch)
tree75c82a8094c68ff5da2483abd5232220ab101a2a
parent22a97159cdce7740b4ae90e7fbeb7f855989a0e9 (diff)
downloadcpython-12e3c710db23ea9370c3bc54a5f0a2c262ffd0cc.zip
cpython-12e3c710db23ea9370c3bc54a5f0a2c262ffd0cc.tar.gz
cpython-12e3c710db23ea9370c3bc54a5f0a2c262ffd0cc.tar.bz2
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.
-rw-r--r--Modules/socketmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 29b6339..616c836 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;
}
}