Cache timecorrection value
This commit is contained in:
parent
3b7ec3d913
commit
21a80650b0
1 changed files with 4 additions and 0 deletions
|
@ -48,6 +48,8 @@ class ConnectionServer(object):
|
||||||
self.num_incoming = 0
|
self.num_incoming = 0
|
||||||
self.num_outgoing = 0
|
self.num_outgoing = 0
|
||||||
|
|
||||||
|
self.timecorrection = 0.0
|
||||||
|
|
||||||
# Bittorrent style peerid
|
# Bittorrent style peerid
|
||||||
self.peer_id = "-UT3530-%s" % CryptHash.random(12, "base64")
|
self.peer_id = "-UT3530-%s" % CryptHash.random(12, "base64")
|
||||||
|
|
||||||
|
@ -280,6 +282,8 @@ class ConnectionServer(object):
|
||||||
self.has_internet = True
|
self.has_internet = True
|
||||||
self.onInternetOnline()
|
self.onInternetOnline()
|
||||||
|
|
||||||
|
self.timecorrection = self.getTimecorrection()
|
||||||
|
|
||||||
if time.time() - s > 0.01:
|
if time.time() - s > 0.01:
|
||||||
self.log.debug("Connection cleanup in %.3fs" % (time.time() - s))
|
self.log.debug("Connection cleanup in %.3fs" % (time.time() - s))
|
||||||
self.log.debug("Checkconnections ended")
|
self.log.debug("Checkconnections ended")
|
||||||
|
|
Loading…
Reference in a new issue