URI: 
       tMerge branch 'master' into feature/label_sync - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 08cedc452de43308ab88f196f880f1a0c758929a
   DIR parent 51560b9ecd1b42d5ee8a8318616e7241da4f7572
  HTML Author: Maran <maran.hidskes@gmail.com>
       Date:   Sun, 10 Mar 2013 17:44:35 +0100
       
       Merge branch 'master' into feature/label_sync
       
       Diffstat:
         M lib/interface.py                    |       7 +++++--
       
       1 file changed, 5 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/lib/interface.py b/lib/interface.py
       t@@ -470,6 +470,9 @@ class Interface(threading.Thread):
                            if message not in self.subscriptions[channel]:
                                self.subscriptions[channel].append(message)
        
       +        if not self.is_connected: 
       +            return
       +
                if self.protocol in 'st':
                    with self.lock:
                        out = self.send_tcp(messages, channel)
       t@@ -516,14 +519,14 @@ class Interface(threading.Thread):
                    print "changing server:", server, proxy
                    self.server = server
                    self.proxy = proxy
       -            if self.protocol in 'st' and self.s:
       +            if self.is_connected and self.protocol in 'st' and self.s:
                        self.s.shutdown(socket.SHUT_RDWR)
                        self.s.close()
                    self.is_connected = False  # this exits the polling loop
                    self.trigger_callback('disconnecting') # for actively disconnecting
        
            def stop(self):
       -        if self.protocol in 'st' and self.s:
       +        if self.is_connected and self.protocol in 'st' and self.s:
                    self.s.shutdown(socket.SHUT_RDWR)
                    self.s.close()