mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-12-01 01:00:51 +00:00
fix a race condition in ConnectionHandler.drain_writers
(#5749)
This commit is contained in:
parent
e24f93e263
commit
b9dc95cb8c
@ -307,7 +307,7 @@ class ConnectionHandler(metaclass=abc.ABCMeta):
|
||||
write buffers, so if we cannot write fast enough our own read buffers run full and the TCP recv stream is throttled.
|
||||
"""
|
||||
async with self._drain_lock:
|
||||
for transport in self.transports.values():
|
||||
for transport in list(self.transports.values()):
|
||||
if transport.writer is not None:
|
||||
try:
|
||||
await transport.writer.drain()
|
||||
|
Loading…
Reference in New Issue
Block a user