File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/Client/Infrastructure Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11using System ;
2- using System . Buffers . Text ;
32using System . Collections . Generic ;
43using System . Net ;
54using System . Net . Http ;
@@ -127,7 +126,9 @@ public async IAsyncEnumerable<object> GetEvents(
127126 var responseStream = await response . Content . ReadAsStreamAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
128127 await using var responseStreamScope = responseStream . ConfigureAwait ( false ) ;
129128
130- await foreach ( var lineData in _readerFactory . CreateReader ( responseStream ) . ConfigureAwait ( false ) )
129+ await foreach ( var lineData in _readerFactory . CreateReader ( responseStream )
130+ . WithCancellation ( cancellationToken )
131+ . ConfigureAwait ( false ) )
131132 {
132133 // Note: this does not support multi-line events, see spec:
133134 // https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation
You can’t perform that action at this time.
0 commit comments