Skip to content

Commit

Permalink
bump up the max number of connections for the proxy server
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@4606 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 23, 2013
1 parent 0b5bdde commit 10905cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/xpra/server/proxy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#use processes:
from multiprocessing import Process #@Reimport

MAX_CONCURRENT_CONNECTIONS = 200


class ProxyServer(ServerCore):
"""
Expand All @@ -46,6 +48,7 @@ class ProxyServer(ServerCore):
def __init__(self):
log("ProxyServer.__init__()")
ServerCore.__init__(self)
self._max_connections = MAX_CONCURRENT_CONNECTIONS
self.main_loop = None
self.processes = []
self.idle_add = gobject.idle_add
Expand Down
3 changes: 2 additions & 1 deletion src/xpra/server/server_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def __init__(self):
self._aliases = {}
self._reverse_aliases = {}
self.socket_types = {}
self._max_connections = MAX_CONCURRENT_CONNECTIONS

self.session_name = "Xpra"

Expand Down Expand Up @@ -263,7 +264,7 @@ def add_listen_socket(self, socktype, socket):
def _new_connection(self, listener, *args):
socktype = self.socket_types.get(listener, "")
sock, address = listener.accept()
if len(self._potential_protocols)>=MAX_CONCURRENT_CONNECTIONS:
if len(self._potential_protocols)>=self._max_connections:
log.error("too many connections (%s), ignoring new one", len(self._potential_protocols))
sock.close()
return True
Expand Down

0 comments on commit 10905cb

Please sign in to comment.