From 54776ca1d96d08d6b582a58e918d585aef1cdad3 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 4 Sep 2019 13:07:44 +0200 Subject: [PATCH] disable http server by default --- electrum/daemon.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/electrum/daemon.py b/electrum/daemon.py index 89c24fea3..d33b9f06c 100644 --- a/electrum/daemon.py +++ b/electrum/daemon.py @@ -194,7 +194,7 @@ class HttpServer(Logger): runner = web.AppRunner(app) await runner.setup() host = self.config.get('http_host', 'localhost') - port = self.config.get('http_port', 8000) + port = int(self.config.get('http_port')) site = web.TCPSite(runner, port=port, host=host) await site.start() @@ -271,10 +271,11 @@ class Daemon(Logger): # Setup JSONRPC server if listen_jsonrpc: jobs.append(self.start_jsonrpc(config, fd)) - # server-side watchtower - self.http_server = HttpServer(self) - if self.http_server: + # request server + if self.config.get('http_port'): + self.http_server = HttpServer(self) jobs.append(self.http_server.run()) + # server-side watchtower self.watchtower = WatchTowerServer(self.network) if self.config.get('watchtower_host') else None if self.watchtower: jobs.append(self.watchtower.run)