diff --git a/src/network/advanceddispatcher.py b/src/network/advanceddispatcher.py index 8df557ad..b12ca1e4 100644 --- a/src/network/advanceddispatcher.py +++ b/src/network/advanceddispatcher.py @@ -31,6 +31,7 @@ class AdvancedDispatcher(asyncore.dispatcher): def __init__(self, sock=None): if not hasattr(self, '_map'): asyncore.dispatcher.__init__(self, sock) + self.connectedAt = 0 self.close_reason = None self.read_buf = bytearray() self.write_buf = bytearray() diff --git a/src/network/proxy.py b/src/network/proxy.py index 38676d66..953c15f5 100644 --- a/src/network/proxy.py +++ b/src/network/proxy.py @@ -113,7 +113,6 @@ class Proxy(AdvancedDispatcher): self.destination = address self.isOutbound = True self.fullyEstablished = False - self.connectedAt = 0 self.create_socket(socket.AF_INET, socket.SOCK_STREAM) if BMConfigParser().safeGetBoolean( "bitmessagesettings", "socksauthentication"): @@ -145,6 +144,5 @@ class Proxy(AdvancedDispatcher): def state_proxy_handshake_done(self): """Handshake is complete at this point""" - # pylint: disable=attribute-defined-outside-init self.connectedAt = time.time() return False diff --git a/src/network/tcp.py b/src/network/tcp.py index 1b30a0a2..ff778378 100644 --- a/src/network/tcp.py +++ b/src/network/tcp.py @@ -51,7 +51,6 @@ class TCPConnection(BMProto, TLSDispatcher): self.verackSent = False self.streams = [0] self.fullyEstablished = False - self.connectedAt = 0 self.skipUntil = 0 if address is None and sock is not None: self.destination = Peer(*sock.getpeername()) diff --git a/src/network/udp.py b/src/network/udp.py index 7852aeea..3f999332 100644 --- a/src/network/udp.py +++ b/src/network/udp.py @@ -28,7 +28,6 @@ class UDPSocket(BMProto): # pylint: disable=too-many-instance-attributes # .. todo:: sort out streams self.streams = [1] self.fullyEstablished = True - self.connectedAt = 0 self.skipUntil = 0 if sock is None: if host is None: