prevent exceptions from trying to submit txs to bitcoind while connection is lost
authorForrest Voight <forrest@forre.st>
Sun, 21 Oct 2012 19:37:53 +0000 (15:37 -0400)
committerForrest Voight <forrest@forre.st>
Sun, 21 Oct 2012 19:37:53 +0000 (15:37 -0400)
p2pool/node.py

index 406787c..7c5c83c 100644 (file)
@@ -241,6 +241,8 @@ class Node(object):
         @defer.inlineCallbacks
         def _(before, after):
             yield deferral.sleep(random.expovariate(1/1))
+            if self.factory.conn.value is None:
+                return
             for tx_hash in set(after) - set(before):
                 self.factory.conn.value.send_tx(tx=after[tx_hash])