electrum

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

commit 90590f70abd688201c02fac6b9c058fa23c4bb01
parent 98b361f3284d0cd53a0e675097a564b5944935e3
Author: ThomasV <thomasv@gitorious>
Date:   Sun, 14 Sep 2014 14:27:39 +0200

reconnect to main server after timeout

Diffstat:
Mlib/network.py | 13+++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lib/network.py b/lib/network.py @@ -412,8 +412,17 @@ class Network(threading.Thread): if i == self.interface: self.set_status('disconnected') - if not self.interface.is_connected and self.config.get('auto_cycle'): - self.switch_to_random_interface() + if not self.interface.is_connected: + if self.config.get('auto_cycle'): + self.switch_to_random_interface() + else: + if self.default_server not in self.disconnected_servers: + print_error("restarting main interface") + if self.default_server in self.interfaces.keys(): + self.switch_to_interface(self.interfaces[self.default_server]) + else: + self.interface = self.start_interface(self.default_server) + print_error("Network: Stopping interfaces") for i in self.interfaces.values():