mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-03 12:30:07 +00:00
interface: check if future already done in handle_disconnect
future could get cancelled in network.py in which case set_result raised
This commit is contained in:
parent
c6a54f05f5
commit
935ab9a12f
1 changed files with 2 additions and 1 deletions
|
@ -336,7 +336,8 @@ class Interface(Logger):
|
|||
self.logger.debug(f"(disconnect) trace for {repr(e)}", exc_info=True)
|
||||
finally:
|
||||
await self.network.connection_down(self)
|
||||
self.got_disconnected.set_result(1)
|
||||
if not self.got_disconnected.done():
|
||||
self.got_disconnected.set_result(1)
|
||||
# if was not 'ready' yet, schedule waiting coroutines:
|
||||
self.ready.cancel()
|
||||
return wrapper_func
|
||||
|
|
Loading…
Add table
Reference in a new issue