faster updates

This commit is contained in:
Yeicor
2024-03-09 12:59:07 +01:00
parent 9ca53bca61
commit a9ce189c45
2 changed files with 2 additions and 1 deletions

View File

@@ -191,6 +191,7 @@ class Server:
"""Handles a publish-only websocket connection that send show_object events along with their hashes and URLs"""
self.at_least_one_client.set()
async with sse_response(request) as resp:
resp.ping_interval = 0.1 # HACK: Browsers don't receive instant updates without this
logger.debug('Client connected: %s', request.remote)
# Send buffered events first, while keeping a lock