Skip to content

Commit e4e6d6d

Browse files
author
Matthew Fisher
committed
apply forever: true to requests
This option keeps socket connections alive between keep-alive requests. Signed-off-by: Matthew Fisher <[email protected]>
1 parent 5dd9180 commit e4e6d6d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ export class KubeConfig {
154154
username: user.username,
155155
};
156156
}
157+
158+
// keep socket connections alive between keep-alive requests.
159+
opts.forever = true;
157160
}
158161

159162
public loadFromString(config: string, opts?: Partial<ConfigOptions>): void {

src/config_test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ describe('KubeConfig', () => {
270270
url: 'https://company.com',
271271
strictSSL: false,
272272
rejectUnauthorized: false,
273+
forever: true,
273274
});
274275
});
275276
});

0 commit comments

Comments
 (0)