[PATCH 4 of 4] commandserver: use SOMAXCONN as queue size of pending connections

Augie Fackler raf at durin42.com
Mon Jul 18 07:51:36 EDT 2016


On Sun, Jul 17, 2016 at 11:04:24PM +0100, Jun Wu wrote:
> 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

Queued, thanks.

> >
> > 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)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list