mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #21455: Add a default backlog to socket.listen().
This commit is contained in:
parent
2b00c4999d
commit
644b8f52a8
4 changed files with 27 additions and 17 deletions
|
@ -1344,10 +1344,13 @@ class GeneralModuleTests(unittest.TestCase):
|
|||
|
||||
def test_listen_backlog(self):
|
||||
for backlog in 0, -1:
|
||||
srv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as srv:
|
||||
srv.bind((HOST, 0))
|
||||
srv.listen(backlog)
|
||||
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as srv:
|
||||
srv.bind((HOST, 0))
|
||||
srv.listen(backlog)
|
||||
srv.close()
|
||||
srv.listen()
|
||||
|
||||
@support.cpython_only
|
||||
def test_listen_backlog_overflow(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue