mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +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()
|
self._stop.set()
|
||||||
|
|
||||||
# Trigger a fake request to get the server to quit
|
# 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):
|
class RequestHandler(BaseHTTPRequestHandler):
|
||||||
""" Handles incoming HTTP requests """
|
""" Handles incoming HTTP requests """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user