-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
add functions to change timeout #34
Conversation
Hi @UziTech thanks for the pull request! I'll start reviewing over the coming days. The following jumped out at me just with an initial glance at the pull request, though:
|
Good points.
|
also a thought: should P.S. It's a good thing this problem doesn't involve cache invalidation. |
req.setTimeout() -> req.resetTimeout() req.timeoutLeft() -> req.getTimeout()
I renamed the functions:
and added docs to the README |
@dougwilson this should be good to go. |
It would be great to get this merged. |
Hi @UziTech sorry. There are still a few issues with the PR and I was just going to resolve them for you instead of doing more back and forth, I just haven't gotten to it yet. |
@dougwilson is this still moving forward? I have been using this in production with @uzitech/connect-timeout for a while and I haven't had any issues. |
@dougwilson are you still able to merge this? |
Over a year and a half waiting for this PR to be merged! @expressjs If you need help maintaining some of the expressjs packages I would be willing to help. |
We are almost at the 2 year mark. Is there anything I can do to move this along? |
Hi @UziTech , I think that with a new sweeping overview we are doing, this module is likely to just be discontinued and deprecated, as it will not work at all with the upcoming Express, as it calls |
Thanks for the response. |
And @UziTech I hope you can accept my apology for letting this sit here -- I really didn't want to continue this module in many ways and the original authors didn't seem to be around responsive, either. If it does get a fresh breath of air, having the module not start with It may make sense to rebirth as like a middleware wrapper instead. To do something like |
No problem. I just want to make clear that, whatever timeout method is used, it is important to have the ability to cancel/extend the timeout in certain situations. In my project a middleware wrapper wouldn't work because there are multiple middleware that could cause a timeout, so it works better to set a timeout over the entire request. As I said above, If you need any help maintaining small projects I would be happy to help 😁 👍 |
add functions to
req
to change timeoutreq.resetTimeout(delay)
: reset the timeout and start from nowreq.addTimeout(delay)
: add to the current timeoutreq.getTimeout()
: get the amount of milliseconds left (0 after timedout)fixes #26