changeset 1879:81991ded740f

test: Set allow_reuse_addr This avoids intermittent "Address already in use" failure
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Mar 2022 15:38:46 +0800
parents d512da7b1198
children 75d6a9faf919
files test/test_dropbear.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/test_dropbear.py	Sun Mar 13 14:21:13 2022 +0000
+++ b/test/test_dropbear.py	Tue Mar 15 15:38:46 2022 +0800
@@ -72,6 +72,10 @@
 	return f"source {venv}/bin/activate"
 
 class HandleTcp(socketserver.ThreadingMixIn, socketserver.TCPServer):
+
+	# override TCPServer's default, avoids TIME_WAIT
+	allow_reuse_addr = True
+
 	""" Listens for a single incoming request, sends a response if given,
 	and returns the inbound data.
 	Reponse can be a queue object, in which case each item in the queue will