diff src/server/server.py @ 555:db1b330c1eb1

server_side: set the connection attempt timeout to the bridge timeout (2 minutes)
author souliane <souliane@mailoo.org>
date Mon, 22 Sep 2014 12:01:29 +0200
parents 471b6babe960
children 8a607044ecfa
line wrap: on
line diff
--- a/src/server/server.py	Sun Sep 21 14:09:59 2014 +0200
+++ b/src/server/server.py	Mon Sep 22 12:01:29 2014 +0200
@@ -32,7 +32,7 @@
 
 from sat.core.log import getLogger
 log = getLogger(__name__)
-from sat_frontends.bridge.DBus import DBusBridgeFrontend, BridgeExceptionNoService
+from sat_frontends.bridge.DBus import DBusBridgeFrontend, BridgeExceptionNoService, const_TIMEOUT as BRIDGE_TIMEOUT
 from sat.core.i18n import _, D_
 from sat.tools.xml_tools import paramsXML2XMLUI
 
@@ -74,7 +74,7 @@
 
 
 class LiberviaSession(server.Session):
-    sessionTimeout = C.TIMEOUT
+    sessionTimeout = C.SESSION_TIMEOUT
 
     def __init__(self, *args, **kwargs):
         self.__lock = False
@@ -572,7 +572,7 @@
         @param request (server.Request): the connection request
         @param profile (str): %(doc_profile)s
         """
-        dc = reactor.callLater(C.TIMEOUT, self.purgeRequest, profile)
+        dc = reactor.callLater(BRIDGE_TIMEOUT, self.purgeRequest, profile)
         self[profile] = (request, dc)
 
     def purgeRequest(self, profile):