Send the first SSE event immediately (0.2.22)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-13 11:35:37 +02:00
parent 359c289feb
commit c8e1fb8f72
4 changed files with 7 additions and 2 deletions
+1
View File
@@ -442,6 +442,7 @@ def create_app(manager, development=False):
'X-Accel-Buffering': 'no', 'X-Content-Type-Options': 'nosniff'})
await response.prepare(request)
wake, sent = asyncio.Event(), None
wake.set() # first event goes out right away
manager.listeners.add(wake)
try:
while True: