We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
CancellationTokenSource should be disposed. Since we use timer (CancelAfter) it must be disposed properly.
CancellationTokenSource
CancelAfter
https://github.com/Nethereum/Nethereum/blob/d1edf622614fb935ac8809a4b344b1b94d3a1820/src/Nethereum.JsonRpc.RpcClient/RpcClient.cs#L116C17-L117C1
https://stackoverflow.com/questions/6960520/when-to-dispose-cancellationtokensource http://web.archive.org/web/20160203062224/http://blogs.msdn.com/b/pfxteam/archive/2012/03/25/10287435.aspx https://github.com/dotnet/runtime/blob/aaab1701493d2e3bf392cac79f95a167039c9250/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs#L427 https://github.com/dotnet/runtime/blob/aaab1701493d2e3bf392cac79f95a167039c9250/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs#L539
using var cancellationTokenSource = new CancellationTokenSource(); or cancellationTokenSource.Dispose() (in try finally)
var cancellationTokenSource = new CancellationTokenSource(); Dispose missing.
4.15.2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
CancellationTokenSource
should be disposed.Since we use timer (
CancelAfter
) it must be disposed properly.https://github.com/Nethereum/Nethereum/blob/d1edf622614fb935ac8809a4b344b1b94d3a1820/src/Nethereum.JsonRpc.RpcClient/RpcClient.cs#L116C17-L117C1
https://stackoverflow.com/questions/6960520/when-to-dispose-cancellationtokensource
http://web.archive.org/web/20160203062224/http://blogs.msdn.com/b/pfxteam/archive/2012/03/25/10287435.aspx
https://github.com/dotnet/runtime/blob/aaab1701493d2e3bf392cac79f95a167039c9250/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs#L427
https://github.com/dotnet/runtime/blob/aaab1701493d2e3bf392cac79f95a167039c9250/src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs#L539
Expected Behavior
using var cancellationTokenSource = new CancellationTokenSource();
or
cancellationTokenSource.Dispose() (in try finally)
Current Behavior
var cancellationTokenSource = new CancellationTokenSource();
Dispose missing.
Context (Environment)
4.15.2
The text was updated successfully, but these errors were encountered: