Skip to content

Commit 8a53da9

Browse files
authored
Merge pull request #10296 from f321x/fix_watchtower_exception
plugin: watchtower: call start_watching() threadsafe
2 parents b1fc5b2 + f402cb3 commit 8a53da9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

electrum/plugins/watchtower/watchtower.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, parent, config: 'SimpleConfig', name):
5656
return
5757

5858
self.watchtower = WatchTower(self.network)
59-
asyncio.ensure_future(self.watchtower.start_watching())
59+
asyncio.run_coroutine_threadsafe(self.watchtower.start_watching(), self.network.asyncio_loop)
6060
if watchtower_port := self.config.WATCHTOWER_SERVER_PORT:
6161
self.server = WatchTowerServer(self.watchtower, self.network, watchtower_port)
6262
asyncio.run_coroutine_threadsafe(self.network.taskgroup.spawn(self.server.run), self.network.asyncio_loop)

0 commit comments

Comments
 (0)