diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2015-07-27 21:39:22 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2015-07-27 21:39:22 (GMT) |
| commit | 639f42115d3aa0127ddb444e5e31e87d06178c2e (patch) | |
| tree | a5ea252e5c86788d8f471bb15823c5da6e5ee90c | |
| parent | d7a094c1ce8ce69432ad9ad21034086cff4681f8 (diff) | |
| parent | bea232a15fc818341217901772c7e622e9f9332d (diff) | |
| download | cpython-639f42115d3aa0127ddb444e5e31e87d06178c2e.zip cpython-639f42115d3aa0127ddb444e5e31e87d06178c2e.tar.gz cpython-639f42115d3aa0127ddb444e5e31e87d06178c2e.tar.bz2 | |
Merge 3.5 (socket)
| -rw-r--r-- | Modules/socketmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 7610b0c..ee24907 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -2211,7 +2211,12 @@ sock_accept_impl(PySocketSockObject *s, void *data) #else ctx->result = accept(s->sock_fd, SAS2SA(ctx->addrbuf), ctx->addrlen); #endif + +#ifdef MS_WINDOWS + return (ctx->result != INVALID_SOCKET); +#else return (ctx->result >= 0); +#endif } /* s._accept() -> (fd, address) */ |
