From 8d8123c556ffa75741677782dbb6fe6af4954ab1 Mon Sep 17 00:00:00 2001 From: Silent YANG Date: Wed, 29 Nov 2023 22:24:49 +0800 Subject: [PATCH] sock close --- app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app.py b/app.py index ed5305d..006c595 100644 --- a/app.py +++ b/app.py @@ -23,6 +23,7 @@ def dns_query(): sock.sendto(payload, ("1.1.1.1", 53)) rx_meesage, addr = sock.recvfrom(4096) return make_response(rx_meesage, 200, {"Content-Type": "application/dns-message"}) + sock.close() return make_response("", 400) if __name__ == "__main__":