[PATCH 4 of 4] commandserver: use SOMAXCONN as queue size of pending connections
Jun Wu
quark at fb.com
Sun Jul 17 18:04:24 EDT 2016
These are all looking good. I have marked them as pre-reviewed.
Excerpts from Yuya Nishihara's message of 2016-07-17 23:03:02 +0900:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1468648138 -32400
> # Sat Jul 16 14:48:58 2016 +0900
> # Node ID 0251417a7d39e623df71746f29daff55425ee415
> # Parent 80953463c7d704337c646e2c730318f438c2098e
> commandserver: use SOMAXCONN as queue size of pending connections
>
> The old value 5 was arbitrary chosen. Since there's no practical reason to
> limit the backlog, this patch simply uses SOMAXCONN as a value large enough.
>
> diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py
> --- a/mercurial/commandserver.py
> +++ b/mercurial/commandserver.py
> @@ -440,7 +440,7 @@ class unixforkingservice(object):
> def init(self):
> self._sock = socket.socket(socket.AF_UNIX)
> self._servicehandler.bindsocket(self._sock, self.address)
> - self._sock.listen(5)
> + self._sock.listen(socket.SOMAXCONN)
> o = signal.signal(signal.SIGCHLD, self._sigchldhandler)
> self._oldsigchldhandler = o
> self._servicehandler.printbanner(self.address)
More information about the Mercurial-devel
mailing list