mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
SSE server reliability improvements
This commit is contained in:
@@ -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"""
|
||||
|
||||
@@ -105,6 +105,7 @@ class APISpotsStreamHandler(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"""
|
||||
|
||||
Reference in New Issue
Block a user