# HG changeset patch # User souliane # Date 1411380089 -7200 # Node ID db1b330c1eb160d6053c336af63381329a6fcef7 # Parent 471b6babe96007d0653e539254622d12a2ae8abd server_side: set the connection attempt timeout to the bridge timeout (2 minutes) diff -r 471b6babe960 -r db1b330c1eb1 src/server/constants.py --- a/src/server/constants.py Sun Sep 21 14:09:59 2014 +0200 +++ b/src/server/constants.py Mon Sep 22 12:01:29 2014 +0200 @@ -30,7 +30,7 @@ APP_NAME_FILE = "libervia" SERVICE_PROFILE = 'libervia' # the SàT profile that is used for exporting the service - TIMEOUT = 300 # Session's time out, after that the user will be disconnected or a waiting connection request will be reset + SESSION_TIMEOUT = 300 # Session's timeout, after that the user will be disconnected HTML_DIR = "html/" SERVER_CSS_DIR = "server_css/" MEDIA_DIR = "media/" diff -r 471b6babe960 -r db1b330c1eb1 src/server/server.py --- 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):