From 73805fea46a75ad4681e934baf62671398b0adb7 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dalido Date: Tue, 14 Jan 2025 17:17:52 +0100 Subject: [PATCH] streaming: fix reading the last empty chunk --- packages/ssestream/streaming.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ssestream/streaming.go b/packages/ssestream/streaming.go index 52eacaa..651a6a6 100644 --- a/packages/ssestream/streaming.go +++ b/packages/ssestream/streaming.go @@ -143,7 +143,7 @@ func (s *Stream[T]) Next() bool { if bytes.HasPrefix(s.decoder.Event().Data, []byte("[DONE]")) { s.done = true - return false + continue } if s.decoder.Event().Type == "" {