more fixes

This commit is contained in:
Yeicor
2024-03-16 16:22:08 +01:00
parent cb0a7bdf0c
commit 1d01c75448
3 changed files with 32 additions and 41 deletions

View File

@@ -75,7 +75,7 @@ class HTTPHandler(SimpleHTTPRequestHandler):
with self.yacv.frontend_lock.r_locked():
# Avoid accepting new connections while shutting down
if self.yacv.shutting_down.is_set() and not self.yacv.at_least_one_client.is_set():
if self.yacv.shutting_down.is_set() and self.yacv.at_least_one_client.is_set():
self.send_error(HTTPStatus.SERVICE_UNAVAILABLE, 'Server is shutting down')
return
self.yacv.at_least_one_client.set()