Fix UnhandledPromiseRejectionWarning in KubeApi.watch (#4919)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-02-22 13:34:49 -05:00
1 parent 7c9ec87b3c
commit 9c604dcfa1
1 file changed
+3 -1
+3 -1
View File
@@ -671,7 +671,9 @@ export class KubeApi<T extends KubeObject> {
callback(null, error);
});
return abortController.abort;
return () => {
abortController.abort();
};
}
protected modifyWatchEvent(event: IKubeWatchEvent<KubeJsonApiData>) {