mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Sometimes the HTTP interface wouldn't manage to shut its threads down.
This commit is contained in:
parent
cfa27c25a8
commit
1988b5ed79
@ -74,7 +74,10 @@ class HTTPInterface(threading.Thread):
|
||||
self._stop.set()
|
||||
|
||||
# Trigger a fake request to get the server to quit
|
||||
requests.get("http://127.0.0.1:{}".format(SERVER_PORT))
|
||||
try:
|
||||
requests.get("http://127.0.0.1:{}".format(SERVER_PORT), timeout=0.001)
|
||||
except requests.TimeOut:
|
||||
pass
|
||||
|
||||
class RequestHandler(BaseHTTPRequestHandler):
|
||||
""" Handles incoming HTTP requests """
|
||||
|
Loading…
x
Reference in New Issue
Block a user