We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6ccff63 + 8e65d28 commit bc66da9Copy full SHA for bc66da9
trinity/protocol/common/managers.py
@@ -206,6 +206,12 @@ async def _cleanup(self) -> None:
206
self,
207
)
208
209
+ def __del__(self) -> None:
210
+ if self.pending_request is not None:
211
+ _, future = self.pending_request
212
+ if future.cancel():
213
+ self.logger.debug("Forcefully cancelled a pending response in %s", self)
214
+
215
def deregister_peer(self, peer: BasePeer) -> None:
216
if self.pending_request is not None:
217
self.logger.debug("Peer stream %r shutting down, cancelling the pending request", self)
0 commit comments