Mercurial > libervia-web
changeset 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 | 3aef7c5c7d3a |
files | src/server/constants.py src/server/server.py |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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/"
--- 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):