mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
wallet: (fix) synchronizer would also resub closed wallets...
network cb was not removed, so Synchronizer and the wallet itself was kept in memory; and Synchronizer kept working
This commit is contained in:
parent
6cc70bc7a2
commit
e415c0d930
2 changed files with 6 additions and 2 deletions
|
@ -296,7 +296,7 @@ class ElectrumGui(Logger):
|
|||
self.daemon.add_wallet(wallet)
|
||||
return wallet
|
||||
|
||||
def close_window(self, window):
|
||||
def close_window(self, window: ElectrumWindow):
|
||||
if window in self.windows:
|
||||
self.windows.remove(window)
|
||||
self.build_tray_menu()
|
||||
|
|
|
@ -1003,6 +1003,10 @@ class NetworkJobOnDefaultServer(Logger):
|
|||
raise NotImplementedError() # implemented by subclasses
|
||||
|
||||
async def stop(self):
|
||||
self.network.unregister_callback(self._restart)
|
||||
await self._stop()
|
||||
|
||||
async def _stop(self):
|
||||
await self.group.cancel_remaining()
|
||||
|
||||
@log_exceptions
|
||||
|
@ -1012,7 +1016,7 @@ class NetworkJobOnDefaultServer(Logger):
|
|||
return # we should get called again soon
|
||||
|
||||
async with self._restart_lock:
|
||||
await self.stop()
|
||||
await self._stop()
|
||||
self._reset()
|
||||
await self._start(interface)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue