bugfix: poke to reconnect

This commit is contained in:
ThomasV 2012-05-12 09:38:42 +02:00
parent ec24fcb1f7
commit 634bff6f8a
3 changed files with 4 additions and 3 deletions

View File

@ -218,9 +218,10 @@ class TcpStratumInterface(Interface):
self.s.connect(( self.host, self.port)) self.s.connect(( self.host, self.port))
self.is_connected = True self.is_connected = True
self.send([('server.version', [ELECTRUM_VERSION])]) self.send([('server.version', [ELECTRUM_VERSION])])
print "Connected to %s:%d"%(self.host,self.port)
except: except:
self.is_connected = False self.is_connected = False
print "not connected" print "Not connected"
def run(self): def run(self):
try: try:
@ -380,7 +381,6 @@ class WalletSynchronizer(threading.Thread):
response = self.interface.responses.get() response = self.interface.responses.get()
self.handle_response(response) self.handle_response(response)
print "disconnected, gui callback"
self.wallet.gui_callback() self.wallet.gui_callback()
if self.loop: if self.loop:
time.sleep(5) time.sleep(5)

View File

@ -1,2 +1,2 @@
ELECTRUM_VERSION = "0.48a" ELECTRUM_VERSION = "0.48b"
SEED_VERSION = 4 # bump this everytime the seed generation is modified SEED_VERSION = 4 # bump this everytime the seed generation is modified

View File

@ -308,6 +308,7 @@ class Wallet:
self.server = server self.server = server
self.save() self.save()
self.interface.is_connected = False # this exits the polling loop self.interface.is_connected = False # this exits the polling loop
self.interface.poke()
def set_path(self, wallet_path): def set_path(self, wallet_path):