mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
Issue #21566: Make use of socket.listen() default backlog.
This commit is contained in:
parent
8518b79a8d
commit
6e20460dc6
18 changed files with 33 additions and 33 deletions
|
@ -137,7 +137,7 @@ class DummyFTPHandler(asynchat.async_chat):
|
|||
def cmd_pasv(self, arg):
|
||||
with socket.socket() as sock:
|
||||
sock.bind((self.socket.getsockname()[0], 0))
|
||||
sock.listen(5)
|
||||
sock.listen()
|
||||
sock.settimeout(TIMEOUT)
|
||||
ip, port = sock.getsockname()[:2]
|
||||
ip = ip.replace('.', ','); p1 = port / 256; p2 = port % 256
|
||||
|
@ -155,7 +155,7 @@ class DummyFTPHandler(asynchat.async_chat):
|
|||
def cmd_epsv(self, arg):
|
||||
with socket.socket(socket.AF_INET6) as sock:
|
||||
sock.bind((self.socket.getsockname()[0], 0))
|
||||
sock.listen(5)
|
||||
sock.listen()
|
||||
sock.settimeout(TIMEOUT)
|
||||
port = sock.getsockname()[1]
|
||||
self.push('229 entering extended passive mode (|||%d|)' %port)
|
||||
|
@ -983,7 +983,7 @@ class TestTimeouts(TestCase):
|
|||
# 1) when the connection is ready to be accepted.
|
||||
# 2) when it is safe for the caller to close the connection
|
||||
# 3) when we have closed the socket
|
||||
self.sock.listen(5)
|
||||
self.sock.listen()
|
||||
# (1) Signal the caller that we are ready to accept the connection.
|
||||
self.evt.set()
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue