tsmaller timeout if disconnected - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit f74aa9ed3a3aec0448790136a9326aa45e7d18c0 DIR parent ab13e248ee4f57164dac203e9b6ef8ba60cf31c9 HTML Author: ThomasV <thomasv@gitorious> Date: Sat, 5 Oct 2013 15:31:39 +0200 smaller timeout if disconnected Diffstat: M lib/network.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- DIR diff --git a/lib/network.py b/lib/network.py t@@ -221,6 +221,9 @@ class Network(threading.Thread): if self.default_server == server and self.interface: return + if self.protocol != server.split(':')[2]: + return + # stop the interface in order to terminate subscriptions if self.interface: self.interface.stop() t@@ -269,7 +272,7 @@ class Network(threading.Thread): while self.is_running(): try: - i = self.queue.get(timeout = 30) + i = self.queue.get(timeout = 30 if self.interfaces else 3) except Queue.Empty: if len(self.interfaces) < NUM_SERVERS: self.start_random_interface()