From ae8a0abc34d5717ed1fc0bf19e23431a2dd4fca4 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Tue, 15 Mar 2022 15:38:46 +0800 Subject: [PATCH] test: Set allow_reuse_addr This avoids intermittent "Address already in use" failure --- test/test_dropbear.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_dropbear.py b/test/test_dropbear.py index 5e7fcc6..77d1774 100644 --- a/test/test_dropbear.py +++ b/test/test_dropbear.py @@ -72,6 +72,10 @@ def own_venv_command(): 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