Skip to content

Commit 5f17b3b

Browse files
committed
fix: return scanner error if any
1 parent 2c16b1b commit 5f17b3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sse-decoder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@ func (d *decoder) decode(r io.Reader) ([]Event, error) {
111111
// Once the end of the file is reached, the user agent must dispatch the event one final time.
112112
d.dispatchEvent(currentEvent, dataBuffer.String())
113113

114-
return d.events, nil
114+
return d.events, s.Err()
115115
}

0 commit comments

Comments
 (0)