about summary refs log tree commit diff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.py b/main.py
index 3f3aace..3bfdeeb 100644
--- a/main.py
+++ b/main.py
@@ -168,8 +168,8 @@ class HTTPServer:
 
         # Remove self from thread list and close the connection
         self.client_threads.remove(threading.current_thread())
-        client.close()
         self.semaphore.release()
+        client.close()
 
     def _client_request_handler(self, client: _usocket, request: Request):
         """