about summary refs log tree commit diff
path: root/main.py
diff options
context:
space:
mode:
authorUltraQbik <no1skill@yandex.ru>2024-08-24 23:09:28 +0300
committerUltraQbik <no1skill@yandex.ru>2024-08-24 23:09:28 +0300
commit11b2fa6e8d6846673374e618a3d0556ed7012dfe (patch)
tree30be675fd1fffe13017279726f8e39abebe01d55 /main.py
parent6ef9259daefd70e24a78e99b95a08d0c48927182 (diff)
downloadhttpy-11b2fa6e8d6846673374e618a3d0556ed7012dfe.tar.gz
httpy-11b2fa6e8d6846673374e618a3d0556ed7012dfe.zip
Fix odd bugs
Odd because I don't know why I coded it that way
Diffstat (limited to 'main.py')
-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