File tree Expand file tree Collapse file tree
packages/core/src/v3/apiClient Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -515,13 +515,15 @@ export class SSEStreamSubscription implements StreamSubscription {
515515
516516 if ( done ) {
517517 reader . releaseLock ( ) ;
518+ this . notifyComplete ( ) ;
518519 controller . close ( ) ;
519520 return ;
520521 }
521522
522523 if ( this . options . signal ?. aborted ) {
523524 reader . cancel ( ) ;
524525 reader . releaseLock ( ) ;
526+ this . notifyComplete ( ) ;
525527 controller . close ( ) ;
526528 return ;
527529 }
@@ -536,6 +538,7 @@ export class SSEStreamSubscription implements StreamSubscription {
536538 } catch ( error ) {
537539 if ( this . options . signal ?. aborted || this . cancelledByConsumer ) {
538540 // User cancel — exit cleanly, don't retry.
541+ this . notifyComplete ( ) ;
539542 controller . close ( ) ;
540543 return ;
541544 }
@@ -560,6 +563,7 @@ export class SSEStreamSubscription implements StreamSubscription {
560563 error ?: Error
561564 ) : Promise < void > {
562565 if ( this . options . signal ?. aborted || this . cancelledByConsumer ) {
566+ this . notifyComplete ( ) ;
563567 controller . close ( ) ;
564568 return ;
565569 }
You can’t perform that action at this time.
0 commit comments