This repository was archived by the owner on Nov 10, 2025. It is now read-only.
Add oracle global timeout#698
Merged
superboyiii merged 8 commits intoneo-project:3.2.1from Apr 21, 2022
Merged
Conversation
Member
|
Use CancellationTokenSource ctsTimeout = new(Settings.Default.Https.Timeout);
CancellationTokenSource ctsLinked = CancellationTokenSource.CreateLinkedTokenSource(cancelSource.Token, ctsTimeout.Token);
try
{
return await protocol.ProcessAsync(uri, ctsLinked.Token);
}
catch
{
return (OracleResponseCode.Error, null);
} |
vncoelho
reviewed
Mar 17, 2022
| HttpResponseMessage message; | ||
| try | ||
| { | ||
| int redirects = 2; |
Member
There was a problem hiding this comment.
Hi @shargon, could it be a merge between max redirects and timeout?
And sum the time taken between redirects?
Anyway, this will solve the issue for now.
Member
Author
There was a problem hiding this comment.
Then we should create a new HttpClient for each request, because the timeout it's specified in the class
Contributor
There was a problem hiding this comment.
Why not use httpclienthandler.maxautomaticredirections ?
Member
Author
There was a problem hiding this comment.
Because the original issue, we can have a SSRF
erikzhang
reviewed
Mar 20, 2022
18 tasks
Jim8y
previously approved these changes
Apr 15, 2022
erikzhang
reviewed
Apr 18, 2022
erikzhang
reviewed
Apr 20, 2022
Merged
Ashuaidehao
reviewed
Apr 20, 2022
erikzhang
approved these changes
Apr 20, 2022
erikzhang
pushed a commit
that referenced
this pull request
Apr 21, 2022
* add invoked contract (#657) * add in file copyright (#679) * witness rule support (#676) * Prevent SSRF (#692) * limit free gas (#697) * add log when exception happens under debug mode (#690) * dbft: tune MaxBlock* parameters (#688) * Fix StateAPI.MakeFindStatesParams (#699) * update Console to ConsoleHelper (#682) * refac log (#700) * Make RpcServer.ProcessAsync public to enable better neo express integration (#701) * Limit result stack (#696) * fix MaxBlockSystemFee (#703) * code optimise (#704) * Add oracle global timeout (#698)
roman-khimov
added a commit
to nspcc-dev/neo-go
that referenced
this pull request
May 3, 2022
Be compatible with neo-project/neo-modules#698.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #692 (comment)