tests: Fix SO_REUSEADDR for TCP tests

Previous allow_reuse_addr was incorrect, it should be
allow_reuse_address. Confirmed looking at setsockopt in strace when
running tcpflushout test.

This is a partial fix for github #386
This commit is contained in:
Matt Johnston
2025-11-12 19:41:49 +08:00
parent 4aecd8849c
commit 3ffa4384e8

View File

@@ -76,7 +76,7 @@ def own_venv_command():
class HandleTcp(socketserver.ThreadingMixIn, socketserver.TCPServer):
# override TCPServer's default, avoids TIME_WAIT
allow_reuse_addr = True
allow_reuse_address = True
""" Listens for a single incoming request, sends a response if given,
and returns the inbound data.