question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow resetting the request timeout with the same value

See original GitHub issue

Currently, when using ServiceRequestContext.setRequestTimeout multiple times with the same value, the latter calls are ignored. It seems like there are use cases for refreshing the timeout multiple times per request, e.g. the timeout should be applied per message in a gRPC message stream. Currently, it’s actually still possible to do this with something silly like setRequestTimeout(timeout * numMessagesSoFar) @trustin, does it make sense to remove the if statement that guards against the same value in this function?

https://github.com/line/armeria/blob/master/core/src/main/java/com/linecorp/armeria/server/DefaultServiceRequestContext.java#L196

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ikhooncommented, Dec 20, 2019

I’d like to give it a shot.😄

0reactions
trustincommented, Sep 1, 2017

Ah, I see. Yes, I made setRequestTimeout to update the timeout against the beginning of request. Not sure which is the ‘right’ behavior, though. Current behavior seems OK to me though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resetting a setTimeout - javascript - Stack Overflow
in your click function, call clearTimeout window.clearTimeout(timeoutHandle); // then call setTimeout again to reset the timer timeoutHandle = window.
Read more >
How to Increase Request Timeout in NGINX - Ubiq BI
By default, NGINX request timeout is 60 seconds. Sometimes you may need to increase request timeout in NGINX to serve long-running requests.
Read more >
Setting request timeout (services) | Cloud Run Documentation
Click the Container tab. In the Request timeout field, enter the timeout value that you want to use in seconds. Use values ranging...
Read more >
Setting and resetting the request timeout for a virus scan
Set a new scan request timeout value. value is a setting from 1 to 45 seconds. The recommended setting is between 8 and...
Read more >
The Importance of Request Timeouts - DEV Community ‍ ‍
Read timeouts cover the amount of time it takes to actually receive the response back from the server. Some HTTP clients allow you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found