Mercurial > hg
changeset 29588:1bb94666b9fc
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.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 16 Jul 2016 14:48:58 +0900 |
parents | 536eec443b4a |
children | 486de14eb394 |
files | mercurial/commandserver.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commandserver.py Sat Jul 16 14:46:31 2016 +0900 +++ b/mercurial/commandserver.py Sat Jul 16 14:48:58 2016 +0900 @@ -443,7 +443,7 @@ 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)