Closed CodeCorrupt closed 10 months ago
Alternatively, the futures could be popped by changing this loop to use enumerate(self.futures)
, then pop using the correlation_id
, and then just deleting the self.futures.pop(str(id(future)), None)
line. But the PR I submitted seemed like a more general solution to me
@CodeCorrupt I was thinking, the on_close
is called quite rarely, maybe it makes sense to copy the whole sequence there so I don't have to do it every time here?
@CodeCorrupt released in 9.2.2
When handing on_close, futures were not properly popped from the futures list, causing an asyncio.exceptions.InvalidStateError when the connection is re-established and the response received.