File tree Expand file tree Collapse file tree
server-common/src/main/java/io/a2a/server/events Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,10 +213,11 @@ public Flow.Publisher<EventQueueItem> consumeAll() {
213213 // the stream-end signal can reach the client BEFORE the buffered final event,
214214 // causing the client to close the connection and never receive the final event.
215215 // This is especially important in replicated scenarios where events arrive via Kafka
216- // and timing is less deterministic. A small delay ensures the buffer flushes.
216+ // and timing is less deterministic. A delay ensures the buffer flushes.
217+ // Increased to 150ms to account for CI environment latency and JVM scheduling delays.
217218 if (isFinalSent ) {
218219 try {
219- Thread .sleep (50 ); // 50ms to allow SSE buffer flush
220+ Thread .sleep (150 ); // 150ms to allow SSE buffer flush in CI environments
220221 } catch (InterruptedException e ) {
221222 Thread .currentThread ().interrupt ();
222223 }
You can’t perform that action at this time.
0 commit comments