mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-10-28 09:09:29 +00:00
Without an initial flush(), the JVM HttpServer buffers all output until the first flush() in the 15-second keep-alive loop. Clients with shorter timeouts (e.g. 10 s) abort before receiving any data. Add a flush() call directly after creating ServerSentEventSender, before the wait loop, so the HTTP 200 response and headers reach the client immediately upon connection. Adds regression test SseInitialFlushTest that verifies at least one byte arrives within 2 seconds of connecting to GET /api/v1/events.