made ReplyMatcher not resend queries and made the example in bitcoin.p2p handle timeouts
[p2pool.git] / p2pool / util / deferral.py
index 4a5e1a5..738326a 100644 (file)
@@ -41,7 +41,8 @@ class ReplyMatcher(object):
         self.map = {}
     
     def __call__(self, id):
-        self.func(id)
+        if id not in self.map:
+            self.func(id)
         df = defer.Deferred()
         def timeout():
             self.map[id].remove((df, timer))