Always return the result at the end of a callback function.
authorCameron Dale <camrdale@gmail.com>
Sat, 10 May 2008 06:58:32 +0000 (23:58 -0700)
committerCameron Dale <camrdale@gmail.com>
Sat, 10 May 2008 06:58:32 +0000 (23:58 -0700)
apt_p2p_Khashmir/khashmir.py

index 54951b7..394d75e 100644 (file)
@@ -232,6 +232,7 @@ class KhashmirBase(protocol.Factory):
                 if newnode.id not in self.pinging:
                     self.pinging[newnode.id] = reactor.callLater(self.config['MIN_PING_INTERVAL'],
                                                                  self.sendPing, newnode)
+                return newnode
             df.addCallback(rePing)
 
     def _staleNodeHandler(self, err, old, node, contacted):