code style fix in Peer.py

This commit is contained in:
Vadim Ushakov 2021-10-21 14:50:54 +07:00
parent b194eb0f33
commit cd3262a2a7

View file

@ -82,7 +82,7 @@ class Peer(object):
# This is to be used to prevent disconnecting from peers when doing # This is to be used to prevent disconnecting from peers when doing
# a periodic cleanup. # a periodic cleanup.
def markProtected(self, interval=60*20): def markProtected(self, interval=60*20):
self.protected = time.time() + interval self.protected = max(self.protected, time.time() + interval)
def isProtected(self): def isProtected(self):
if self.protected > 0: if self.protected > 0: