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

Nethereum is using http connection lifespan and idle timeout of 1 hour - too long #1008

Open
sergey-s-s opened this issue Feb 13, 2024 · 1 comment

Comments

@sergey-s-s
Copy link
Contributor

Nethereum is using http connection leftspan of 1 hour - too high.

Despine the name (NUMBER_OF_SECONDS_TO_RECREATE_HTTP_CLIENT = 60), it is acutally the number of minutes as it is passe as 'minutes' param to TimeSpan:
see https://github.com/Nethereum/Nethereum/blob/master/src/Nethereum.JsonRpc.RpcClient/RpcClient.cs#L73

Likely meant to pass as the last arg. Recommend to use TimeSpan.FromMinutes() or FromSeconds() rather than new() to make time unit obviously clear.

@sergey-s-s sergey-s-s changed the title Nethereum is using http connection lifespan and idle timeout of 1 hour - too high Nethereum is using http connection lifespan and idle timeout of 1 hour - too long Feb 13, 2024
juanfranblanco added a commit that referenced this issue Feb 14, 2024
juanfranblanco added a commit that referenced this issue Feb 14, 2024
Better commit, the original was reusing the value of http client recreation for older frameworks, these are more specific values, that allow for longer requests but no 60 minutes (that is too long)
@juanfranblanco
Copy link
Member

Changed in the latest to be more clear. As I remember now this was done to allow very long requests (debug), although yes.. Too long.

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

2 participants