URI: 
       tfix switch_to_random_interface - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 0240b8c9249326a051b58bbb148be80f47796923
   DIR parent 411a87e0a3d9bfe6a3d84a16aa2d524a545b0a77
  HTML Author: ThomasV <thomasv@gitorious>
       Date:   Tue, 29 Jul 2014 14:26:19 +0200
       
       fix switch_to_random_interface
       
       Diffstat:
         M lib/network.py                      |       5 ++---
       
       1 file changed, 2 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/lib/network.py b/lib/network.py
       t@@ -250,13 +250,12 @@ class Network(threading.Thread):
        
        
            def switch_to_random_interface(self):
       -        while True:
       +        while self.interfaces:
                    i = random.choice(self.interfaces.values())
                    if i.is_connected:
                        self.switch_to_interface(i)
       -                break
                    else:
       -                time.sleep(0.1)
       +                self.interfaces.pop(i.server)
        
            def switch_to_interface(self, interface):
                server = interface.server