There was an error while loading. Please reload this page.
1 parent 27b7e51 commit 36203dfCopy full SHA for 36203df
1 file changed
Lib/test/test_socket.py
@@ -1720,6 +1720,15 @@ def test_listen_backlog(self):
1720
srv.bind((HOST, 0))
1721
srv.listen()
1722
1723
+ def test_listen_backlog_connect(self):
1724
+ for backlog in 0, -1:
1725
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as srv:
1726
+ srv.bind((HOST, 65200))
1727
+ srv.listen(backlog)
1728
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as c:
1729
+ c.connect((HOST, 65200))
1730
+ c.send(MSG)
1731
+
1732
@support.cpython_only
1733
def test_listen_backlog_overflow(self):
1734
# Issue 15989
0 commit comments