Close eventstreams upon completion
Previously we were not closing eventSource's upon completion which lead to stale eventstream calls persisting across a session in the scaffolder. This calls eventSource.close() properly in order to clean up an eventStream once we get completion event Signed-off-by: jrusso1020 <jrusso@brex.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Close eventSource upon completion of a scaffolder task
|
||||
@@ -214,6 +214,7 @@ export class ScaffolderClient implements ScaffolderApi {
|
||||
subscriber.error(ex);
|
||||
}
|
||||
}
|
||||
eventSource.close();
|
||||
subscriber.complete();
|
||||
});
|
||||
eventSource.addEventListener('error', event => {
|
||||
|
||||
Reference in New Issue
Block a user