electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit ed2db4be8047d7807e6c2cac3041d2468199961c
parent 6977ba603bdaf8105155caca638b1f163d842e4c
Author: ThomasV <thomasv@electrum.org>
Date:   Mon,  6 Mar 2017 12:30:27 +0100

Merge pull request #2239 from shsmith/master

fix #2204
Diffstat:
Mlib/network.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/network.py b/lib/network.py @@ -334,14 +334,14 @@ class Network(util.DaemonThread): for request in requests: message_id = self.queue_request(request[0], request[1]) self.unanswered_requests[message_id] = request - for addr in self.subscribed_addresses: - self.queue_request('blockchain.address.subscribe', [addr]) self.queue_request('server.banner', []) self.queue_request('server.donation_address', []) self.queue_request('server.peers.subscribe', []) for i in bitcoin.FEE_TARGETS: self.queue_request('blockchain.estimatefee', [i]) self.queue_request('blockchain.relayfee', []) + for addr in self.subscribed_addresses: + self.queue_request('blockchain.address.subscribe', [addr]) def get_status_value(self, key): if key == 'status': @@ -441,6 +441,8 @@ class Network(util.DaemonThread): self.print_error("stopping network") for interface in self.interfaces.values(): self.close_interface(interface) + if self.interface: + self.close_interface(self.interface) assert self.interface is None assert not self.interfaces self.connecting = set() @@ -678,7 +680,8 @@ class Network(util.DaemonThread): # Responses to connection attempts? while not self.socket_queue.empty(): server, socket = self.socket_queue.get() - self.connecting.remove(server) + if server in self.connecting: + self.connecting.remove(server) if socket: self.new_interface(server, socket) else: