Skip to content

Commit

Permalink
allow the socket timeout to be configured using an env var
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@4615 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 24, 2013
1 parent 771f428 commit c247ab6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xpra/server/proxy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
from xpra.scripts.config import parse_number, parse_bool


PROXY_SOCKET_TIMEOUT = float(os.environ.get("XPRA_PROXY_SOCKET_TIMEOUT", "0.1"))
assert PROXY_SOCKET_TIMEOUT>0, "invalid proxy socket timeout"
PROXY_QUEUE_SIZE = int(os.environ.get("XPRA_PROXY_QUEUE_SIZE", "10"))
USE_THREADING = os.environ.get("XPRA_USE_THREADING", "0")=="1"
if USE_THREADING:
Expand Down Expand Up @@ -56,7 +58,7 @@ def __init__(self):
self.idle_add = gobject.idle_add
self.timeout_add = gobject.timeout_add
self.source_remove = gobject.source_remove
self._socket_timeout = 0.1
self._socket_timeout = PROXY_SOCKET_TIMEOUT

def init(self, opts):
log("ProxyServer.init(%s)", opts)
Expand Down

0 comments on commit c247ab6

Please sign in to comment.