mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
EventStream to sent ping on start to notify browser
This commit is contained in:
parent
a68ab07e72
commit
4d5eb0e3fc
@ -109,6 +109,8 @@ class APIEventStream(HomeAssistantView):
|
|||||||
_LOGGER.debug('STREAM %s ATTACHED', id(stop_obj))
|
_LOGGER.debug('STREAM %s ATTACHED', id(stop_obj))
|
||||||
|
|
||||||
last_msg = time()
|
last_msg = time()
|
||||||
|
# Fire off one message right away to have browsers fire open event
|
||||||
|
to_write.put(STREAM_PING_PAYLOAD)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user