Skip to content

Commit

Permalink
apply forever: true to requests
Browse files Browse the repository at this point in the history
This option keeps socket connections alive between keep-alive requests.

Signed-off-by: Matthew Fisher <matt.fisher@microsoft.com>
  • Loading branch information
Matthew Fisher committed Apr 7, 2021
1 parent 5dd9180 commit e4e6d6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ export class KubeConfig {
username: user.username,
};
}

// keep socket connections alive between keep-alive requests.
opts.forever = true;
}

public loadFromString(config: string, opts?: Partial<ConfigOptions>): void {
Expand Down
1 change: 1 addition & 0 deletions src/config_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ describe('KubeConfig', () => {
url: 'https://company.com',
strictSSL: false,
rejectUnauthorized: false,
forever: true,
});
});
});
Expand Down

0 comments on commit e4e6d6d

Please sign in to comment.