about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.py b/main.py
index 8760d15..36d70aa 100644
--- a/main.py
+++ b/main.py
@@ -115,7 +115,7 @@ class HTTPServer:
             # accept new client
             client = self._accept()
             if client is None:
-                break
+                continue
 
             # create thread for new client and append it to the list
             th = threading.Thread(target=self._client_thread, args=[client])
@@ -268,7 +268,9 @@ class HTTPServer:
             except BlockingIOError:
                 time.sleep(0.005)
             except ssl.SSLEOFError:
-                pass  # i d c
+                break
+            except TimeoutError:
+                break
         return None