[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

Aymeric Augustin report at bugs.python.org
Sat Sep 9 08:19:16 EDT 2017


Aymeric Augustin added the comment:

I worked around this bug in websockets by serializing access to `drain()` with a lock:

https://github.com/aaugustin/websockets/commit/198b71537917adb44002573b14cbe23dbd4c21a2

I suspect this is inefficient but it beats crashing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29930>
_______________________________________


More information about the Python-bugs-list mailing list