Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][CCI] Fixed typo in connection _agent #443

Open
Naurabay opened this issue Mar 18, 2023 · 1 comment
Open

[BUG][CCI] Fixed typo in connection _agent #443

Naurabay opened this issue Mar 18, 2023 · 1 comment
Labels
🐛 bug Something isn't working CCI College Contributor Initiative

Comments

@Naurabay
Copy link
Contributor

What is the bug?

The declared variable _agent is local in the interface of the Connection class, here:

\\Connection.d.ts
export default class Connection {
...
  _agent: http.Agent | https.Agent | hpagent.HttpProxyAgent | hpagent.HttpsProxyAgent;
...

The gist of the bug is that, it was discovered that in the class itself, the call goes to the agent variable, example:

if (typeof opts.agent === 'function') {
      this.agent = opts.agent(opts);
    } else if (opts.agent === false) {
      this.agent = undefined;
    }

Should be

if (typeof opts.agent === 'function') {
      this._agent = opts.agent(opts);
    } else if (opts.agent === false) {
      this.a_gent = undefined;
    }
@nhtruong
Copy link
Collaborator

Nice Catch!

@wbeckler wbeckler added the 🐛 bug Something isn't working label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working CCI College Contributor Initiative
Projects
None yet
Development

No branches or pull requests

3 participants