From 6e8f4eaa5252c1a0e7b44238eb168c01abeb7a0e Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Tue, 18 Jan 2022 23:50:53 +0200 Subject: [PATCH] tests/multi_net/udp_data.py: Allow reusing port before bind. --- tests/multi_net/udp_data.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/multi_net/udp_data.py b/tests/multi_net/udp_data.py index fd3e00918f..0c0f165b74 100644 --- a/tests/multi_net/udp_data.py +++ b/tests/multi_net/udp_data.py @@ -12,6 +12,7 @@ def instance0(): multitest.next() for i in range(NUM_NEW_SOCKETS): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(socket.getaddrinfo("0.0.0.0", PORT)[0][-1]) multitest.broadcast("server ready") for j in range(NUM_TRANSFERS):