Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/Network.py
diff options
context:
space:
mode:
Diffstat (limited to 'Util/Network.py')
-rw-r--r--Util/Network.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Util/Network.py b/Util/Network.py
index 00e641b..f90ea6f 100644
--- a/Util/Network.py
+++ b/Util/Network.py
@@ -472,10 +472,13 @@ class Network:
self.send( HT_LATENCY_REPLY, data, sock )
def processPR_SYNC_QUERY( self, sock, data ):
- self.packer.pack_float(0.11)
+ self.packer.pack_float(self.nextHeartbeat())
self.send( HT_SYNC_REPLY, data + self.packer.get_buffer(), sock )
self.packer.reset()
+ def registerHeartbeat( self, handler ):
+ self.nextHeartbeat = handler
+
#-- PEER handlers ------------------------------------------------------
def processHT_LATENCY_REPLY( self, sock, data ):
t = time.time()