diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-04-09 02:42:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-09 02:42:06 (GMT) |
commit | 8702b67dad62a9084f6c1823dce10653743667c8 (patch) | |
tree | e43d21d01315d3543754a3e43119e5158d6f5dbd /Doc | |
parent | 79b5d29041bd85ea3baa050b3fa2481344ea35c9 (diff) | |
download | cpython-8702b67dad62a9084f6c1823dce10653743667c8.zip cpython-8702b67dad62a9084f6c1823dce10653743667c8.tar.gz cpython-8702b67dad62a9084f6c1823dce10653743667c8.tar.bz2 |
BPO-17561: set create_server backlog default to None (GH-12735)
It turns out doing socket.listen(0) does not equal to "choose a
reasonable default". It actually means "set backlog to 0".
As such set backlog=None as the default for socket.create_server.
Fixes the following BB failures:
https://github.com/python/cpython/pull/11784#issuecomment-481036369
Ref. BPO-1756, GH-11784.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/socket.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index b4a07bd..62c8347 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -595,7 +595,7 @@ The following functions all create :ref:`socket objects <socket-objects>`. .. versionchanged:: 3.2 *source_address* was added. -.. function:: create_server(address, *, family=AF_INET, backlog=0, reuse_port=False, dualstack_ipv6=False) +.. function:: create_server(address, *, family=AF_INET, backlog=None, reuse_port=False, dualstack_ipv6=False) Convenience function which creates a TCP socket bound to *address* (a 2-tuple ``(host, port)``) and return the socket object. |