diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-26 22:07:16 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-26 22:07:16 +0100 |
commit | 31fa887dbd1e6c89728b0ed99f7974266852d3a8 (patch) | |
tree | 8d4929447b2a8a727ab18f87b7267e5612f23fb9 /overlapped.c | |
parent | 6e1910bb8aaa1149bb7ebb7aba3c0c73a5522262 (diff) | |
download | trollius-31fa887dbd1e6c89728b0ed99f7974266852d3a8.tar.gz |
Tulip issue #204: Fix IocpProactor.recv()
If ReadFile() fails with ERROR_BROKEN_PIPE, the operation is not pending: don't
register the overlapped.
I don't know if WSARecv() can fail with ERROR_BROKEN_PIPE. Since
Overlapped.WSARecv() already handled ERROR_BROKEN_PIPE, let me guess that it
has the same behaviour than ReadFile().
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 4661152..1a081ec 100644 --- a/overlapped.c +++ b/overlapped.c @@ -730,7 +730,7 @@ Overlapped_ReadFile(OverlappedObject *self, PyObject *args) switch (err) { case ERROR_BROKEN_PIPE: mark_as_completed(&self->overlapped); - Py_RETURN_NONE; + return SetFromWindowsErr(err); case ERROR_SUCCESS: case ERROR_MORE_DATA: case ERROR_IO_PENDING: @@ -789,7 +789,7 @@ Overlapped_WSARecv(OverlappedObject *self, PyObject *args) switch (err) { case ERROR_BROKEN_PIPE: mark_as_completed(&self->overlapped); - Py_RETURN_NONE; + return SetFromWindowsErr(err); case ERROR_SUCCESS: case ERROR_MORE_DATA: case ERROR_IO_PENDING: |