[New-bugs-announce] [issue38471] _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called
Paul Martin
report at bugs.python.org
Mon Oct 14 06:42:35 EDT 2019
New submission from Paul Martin <greatestloginnameever at gmail.com>:
Expected behaviour for DatagramTransport (from_SelectorDatagramTransport):
transport.close() called.
If there is data in the write buffer, don't call connection_lost.
When all data is written and the buffer is empty, check if connection has been lost and if so, call connection_lost
However for _ProactorDatagramTransport, if close is called with data in the buffer, _loop_writing returns immediately, so it never gets to the point of sending the remaining data or calling connection_lost. The code for calling connection_lost inside _loop_writing is completely unreachable, because the method immediately returns if the connection has been lost.
----------
components: Windows, asyncio
messages: 354626
nosy: asvetlov, paul.moore, primal, steve.dower, tim.golden, yselivanov, zach.ware
priority: normal
severity: normal
status: open
title: _ProactorDatagramTransport: If close() is called when write buffer is not empty, the remaining data is not sent and connection_lost is not called
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38471>
_______________________________________
More information about the New-bugs-announce
mailing list