From 4696c84fbce8cc3efdf9974da393a522fa149b30 Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Wed, 20 Sep 2006 21:49:11 +0000 Subject: [PATCH] set activity tiemout only to connections, established by us --- src/common/zeroconf/client_zeroconf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/zeroconf/client_zeroconf.py b/src/common/zeroconf/client_zeroconf.py index 882225e1d..59d78dc46 100644 --- a/src/common/zeroconf/client_zeroconf.py +++ b/src/common/zeroconf/client_zeroconf.py @@ -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):