Skip to content

Commit

Permalink
network: add server to recent_servers only after checks
Browse files Browse the repository at this point in the history
  • Loading branch information
SomberNight committed Sep 13, 2018
1 parent a9fcf2f commit 1f14894
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions electrum/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,9 +619,6 @@ def connection_down(self, server):

@aiosafe
async def new_interface(self, server):
# todo: get tip first, then decide which checkpoint to use.
self.add_recent_server(server)

interface = Interface(self, server, self.config.path, self.proxy)
timeout = 10 if not self.proxy else 20
try:
Expand All @@ -642,6 +639,7 @@ async def new_interface(self, server):
if server == self.default_server:
self.switch_to_interface(server)

self.add_recent_server(server)
self.notify('interfaces')

def init_headers_file(self):
Expand Down

0 comments on commit 1f14894

Please sign in to comment.