set activity tiemout only to connections,

established by us
This commit is contained in:
Dimitur Kirov 2006-09-20 21:49:11 +00:00
parent bc63142b92
commit 4696c84fbc

View file

@ -348,6 +348,7 @@ class P2PConnection(IdleObject, PlugIn):
if self.state < 0:
return
if self.on_receive:
if self._owner.sock_type == TYPE_CLIENT:
self.set_timeout(ACTIVITY_TIMEOUT_SECONDS)
if received.strip():
self.DEBUG(received, 'got')
@ -415,6 +416,7 @@ class P2PConnection(IdleObject, PlugIn):
return
self._on_send_failure()
return
if self._owner.sock_type == TYPE_CLIENT:
self.set_timeout(ACTIVITY_TIMEOUT_SECONDS)
return True