summaryrefslogtreecommitdiffstats
path: root/Modules/overlapped.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-22 22:50:03 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-22 22:50:03 (GMT)
commit2b77c5467f376257ae22cbfbcb3a0e5e6349e92d (patch)
tree73b2281ca9bdba9865bff42bb6369521a8205f46 /Modules/overlapped.c
parent34cd2ae69fc9a004c95e6c361aa7cd3ae4db2caa (diff)
downloadcpython-2b77c5467f376257ae22cbfbcb3a0e5e6349e92d.zip
cpython-2b77c5467f376257ae22cbfbcb3a0e5e6349e92d.tar.gz
cpython-2b77c5467f376257ae22cbfbcb3a0e5e6349e92d.tar.bz2
asyncio, Tulip issue 204: Fix IocpProactor.accept_pipe()
Overlapped.ConnectNamedPipe() now returns a boolean: True if the pipe is connected (if ConnectNamedPipe() failed with ERROR_PIPE_CONNECTED), False if the connection is in progress. This change removes multiple hacks in IocpProactor.
Diffstat (limited to 'Modules/overlapped.c')
-rw-r--r--Modules/overlapped.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/overlapped.c b/Modules/overlapped.c
index 8fe2e24..4661152 100644
--- a/Modules/overlapped.c
+++ b/Modules/overlapped.c
@@ -1117,10 +1117,10 @@ Overlapped_ConnectNamedPipe(OverlappedObject *self, PyObject *args)
switch (err) {
case ERROR_PIPE_CONNECTED:
mark_as_completed(&self->overlapped);
- Py_RETURN_NONE;
+ Py_RETURN_TRUE;
case ERROR_SUCCESS:
case ERROR_IO_PENDING:
- Py_RETURN_NONE;
+ Py_RETURN_FALSE;
default:
self->type = TYPE_NOT_STARTED;
return SetFromWindowsErr(err);