STINNER Victor <vstin...@redhat.com> added the comment:

_ProactorReadPipeTransport.set_transport():

        if self.is_reading():
            # reset reading callback / buffers / self._read_fut
            self.pause_reading()
            self.resume_reading()

This method cancelled the pending overlapped WSARecv(), and then create a new 
overlapped WSARecv().

Even after CancelIoEx(old overlapped), the IOCP loop still gets an event for 
the completion of the recv. Problem: since the Python future is cancelled, the 
even is ignored and so 176 bytes are lost.

I'm surprised that an overlapped WSARecv() cancelled by CancelIoEx() still 
returns data when IOCP polls for events.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33694>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to