diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-22 23:35:14 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-22 23:35:14 +0100 |
commit | 5570ba2a0975c69dab2865345b70485755d93866 (patch) | |
tree | 8b17c909f3858097d72451f4643cc5bb99b39761 /overlapped.c | |
parent | 478a5878664c6b9a274616b4d7970fd3532ffa96 (diff) | |
download | trollius-5570ba2a0975c69dab2865345b70485755d93866.tar.gz |
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 'overlapped.c')
-rw-r--r-- | overlapped.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/overlapped.c b/overlapped.c index 8fe2e24..4661152 100644 --- a/overlapped.c +++ b/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); |