SSE server reliability improvements

This commit is contained in:
Ian Renton
2026-06-05 16:15:10 +01:00
parent 74caae342b
commit f6622bb942
11 changed files with 24 additions and 22 deletions

View File

@@ -103,6 +103,7 @@ class APIAlertsStreamHandler(tornado_eventsource.handler.EventSourceHandler):
except Exception as e:
logging.warning("Exception when serving SSE socket", e)
self.close()
def close(self):
"""When the user closes the socket, empty our queue and remove it from the list so the server no longer fills it"""