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

Will the pool correctly end if unfillable requests error out? #24

Closed
myndzi opened this issue Aug 5, 2016 · 1 comment
Closed

Will the pool correctly end if unfillable requests error out? #24

myndzi opened this issue Aug 5, 2016 · 1 comment

Comments

@myndzi
Copy link
Owner

myndzi commented Aug 5, 2016

Since request timeouts were added, this case may not have been considered. Investigate and/or fix the case where .end() is called while there are queued requests waiting that time out with an error.

@myndzi
Copy link
Owner Author

myndzi commented Aug 7, 2016

This will indeed loop infinitely, but doesn't apply just to timeouts; if, for example, the underlying resource goes unavailable, a new request is made, and the pool is ended without the source ever becoming available again, the requests will keep retrying until they hit their timeout. This behavior makes sense, but due to the lazy cleanup of timed out requests, an extra step needs to be taken to ensure 'drain' is called and shutdown is completed when the only things left are timed out requests. That's being taken care of, but it's a bit of an ugly hack.

Strongly starting to feel like a fairly significant rewrite is in order, probably promise-based, since I was unable to keep this code as clean as I'd like with callbacks.

@myndzi myndzi closed this as completed in 50abccc Aug 7, 2016
myndzi added a commit that referenced this issue Aug 7, 2016
Closes #24, cleans up #25 a little. Takes care of an edge case where …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant