-
Notifications
You must be signed in to change notification settings - Fork 5
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
Code smells #57
Comments
This is a mistake and should be fixed. Nice catch!
This could use a comment, or a refactor. This code path is only used in a |
If the promise never resolves, what is it racing? |
oh ... if no timeout is passed. We should just return the original promise then. ETA I think a bit of a refactor is in order here too. These are good catches! |
I figured the immediate resolution was intended, since that's also the behavior for when Also, the This code is an impressive fractal of WTF! |
This allows a single agent to serve as both the http and https agents. This PR also refactors some things based on feedback in #57.
This allows a single agent to serve as both the http and https agents. This PR also refactors some things based on feedback in #57.
This allows a single agent to serve as both the http and https agents. This PR also refactors some things based on feedback in #57.
This allows a single agent to serve as both the http and https agents. This PR also refactors some things based on feedback in #57.
This allows a single agent to serve as both the http and https agents. This PR also refactors some things based on feedback in #57.
This allows a single agent to serve as both the http and https agents. This PR also refactors some things based on feedback in #57.
This allows a single agent to serve as both the http and https agents. This PR also refactors some things based on feedback in #57.
This allows a single agent to serve as both the http and https agents. This PR also refactors some things based on feedback in #57.
This allows a single agent to serve as both the http and https agents. This PR also refactors some things based on feedback in #57.
Is there an existing issue for this?
Current Behavior
The following code is slightly suspect. If written as intended, it could use a comment.
Due to the way
once
works, this expression throws anArray
containing a singleError
instead of the probably intendedError
.agent/lib/agents.js
Lines 126 to 128 in 4b2c4d1
This code creates a non-resolving promise (maybe instead of an immediately-resolving Promise?).
agent/lib/util.js
Line 23 in c51096b
Initially reported when trying to figure out the root cause behind: npm/cli#6763
Expected Behavior
No response
Steps To Reproduce
Environment
The text was updated successfully, but these errors were encountered: