set activity tiemout only to connections,
established by us
This commit is contained in:
parent
bc63142b92
commit
4696c84fbc
1 changed files with 4 additions and 2 deletions
|
@ -348,6 +348,7 @@ class P2PConnection(IdleObject, PlugIn):
|
||||||
if self.state < 0:
|
if self.state < 0:
|
||||||
return
|
return
|
||||||
if self.on_receive:
|
if self.on_receive:
|
||||||
|
if self._owner.sock_type == TYPE_CLIENT:
|
||||||
self.set_timeout(ACTIVITY_TIMEOUT_SECONDS)
|
self.set_timeout(ACTIVITY_TIMEOUT_SECONDS)
|
||||||
if received.strip():
|
if received.strip():
|
||||||
self.DEBUG(received, 'got')
|
self.DEBUG(received, 'got')
|
||||||
|
@ -415,6 +416,7 @@ class P2PConnection(IdleObject, PlugIn):
|
||||||
return
|
return
|
||||||
self._on_send_failure()
|
self._on_send_failure()
|
||||||
return
|
return
|
||||||
|
if self._owner.sock_type == TYPE_CLIENT:
|
||||||
self.set_timeout(ACTIVITY_TIMEOUT_SECONDS)
|
self.set_timeout(ACTIVITY_TIMEOUT_SECONDS)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue