Skip to content

Commit

Permalink
streaming: fix reading the last empty chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
jbdalido committed Jan 14, 2025
1 parent 952d231 commit 73805fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ssestream/streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down

0 comments on commit 73805fe

Please sign in to comment.