Commit 4696c84f authored by dkirov's avatar dkirov

set activity tiemout only to connections,

established by us
parent bc63142b
......@@ -348,7 +348,8 @@ class P2PConnection(IdleObject, PlugIn):
if self.state < 0:
return
if self.on_receive:
self.set_timeout(ACTIVITY_TIMEOUT_SECONDS)
if self._owner.sock_type == TYPE_CLIENT:
self.set_timeout(ACTIVITY_TIMEOUT_SECONDS)
if received.strip():
self.DEBUG(received, 'got')
if hasattr(self._owner, 'Dispatcher'):
......@@ -415,7 +416,8 @@ class P2PConnection(IdleObject, PlugIn):
return
self._on_send_failure()
return
self.set_timeout(ACTIVITY_TIMEOUT_SECONDS)
if self._owner.sock_type == TYPE_CLIENT:
self.set_timeout(ACTIVITY_TIMEOUT_SECONDS)
return True
def _plug_idle(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment