From f277092abee6104b65f5b089c7962da271b4e04f Mon Sep 17 00:00:00 2001 From: oldnapalm <38410858+oldnapalm@users.noreply.github.com> Date: Sat, 11 May 2024 12:55:22 -0300 Subject: [PATCH] Use threading server --- fake_dns.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fake_dns.py b/fake_dns.py index 533677fe..b0aba136 100644 --- a/fake_dns.py +++ b/fake_dns.py @@ -52,7 +52,8 @@ def addname(self, name, ip): DNSServer.namemap[name] = ip def start(self): HOST, PORT = "0.0.0.0", self.port - server = socketserver.UDPServer((HOST, PORT), DNSUDPHandler) + socketserver.ThreadingUDPServer.allow_reuse_address = True + server = socketserver.ThreadingUDPServer((HOST, PORT), DNSUDPHandler) server.serve_forever() def fake_dns(server_ip):