Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/Network.py
diff options
context:
space:
mode:
authoramartin <olpc@xo-02-2E-11.localdomain>2007-06-19 06:40:13 (GMT)
committer amartin <olpc@xo-02-2E-11.localdomain>2007-06-19 06:40:13 (GMT)
commit623b8d9d78f887225bfcf0214c9a2c8a8924c551 (patch)
tree5dbcac1375b731890914f430014daa98ee6165c0 /Util/Network.py
parent30fc3b8f2ebe5265904c9e26a4d36c50b11e41f3 (diff)
network
Diffstat (limited to 'Util/Network.py')
-rw-r--r--Util/Network.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Util/Network.py b/Util/Network.py
index 2c5f53c..00e641b 100644
--- a/Util/Network.py
+++ b/Util/Network.py
@@ -488,12 +488,13 @@ class Network:
def processHT_SYNC_REPLY( self, sock, data ):
t = time.time()
- latency = t - self.latencyQueryStart[data[0:4]]
+ hash = data[0:4]
+ latency = t - self.latencyQueryStart[hash]
print "got sync reply %d" % (latency*1000)
- self.unpacker.reset(data[4,8])
- self.latencyQueryHandler[data]( latency, self.unpacker.unpack_float() )
- self.latencyQueryHandler.pop(data)
- self.latencyQueryStart.pop(data)
+ self.unpacker.reset(data[4:8])
+ self.latencyQueryHandler[hash]( latency, self.unpacker.unpack_float() )
+ self.latencyQueryHandler.pop(hash)
+ self.latencyQueryStart.pop(hash)