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

Stream get canceled #26

Open
Trades-King opened this issue Oct 11, 2022 · 3 comments
Open

Stream get canceled #26

Trades-King opened this issue Oct 11, 2022 · 3 comments

Comments

@Trades-King
Copy link

Hi,

i have the latest npm package and get issue sometimes in Rx.NET/Source/src/System.Reactive/AnonymousSafeObserver.cs:line 65

How fix it?

Exception: OpenAPI.Net.Exceptions.ReceiveException: An exception occurred while reading from stream
---> System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](TIOAdapter adapter, Memory1 buffer) at OpenAPI.Net.OpenClient.ReadTcp(CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Reactive.AnonymousSafeObserver1.OnError(Exception error) in //Rx.NET/Source/src/System.Reactive/AnonymousSafeObserver.cs:line 65
at System.Reactive.Sink1.ForwardOnError(Exception error) in //Rx.NET/Source/src/System.Reactive/Internal/Sink.cs:line 61 at OpenAPI.Net.OpenClient.OnError(Exception exception) --- End of stack trace from previous location --- at System.Reactive.AnonymousSafeObserver1.OnError(Exception error) in //Rx.NET/Source/src/System.Reactive/AnonymousSafeObserver.cs:line 65
at System.Reactive.Sink1.ForwardOnError(Exception error) in /
/Rx.NET/Source/src/System.Reactive/Internal/Sink.cs:line 61 at OpenAPI.Net.OpenClient.OnError(Exception exception) --- End of stack trace from previous location --- at System.Reactive.AnonymousSafeObserver1.OnError(Exception error) in //Rx.NET/Source/src/System.Reactive/AnonymousSafeObserver.cs:line 65
at System.Reactive.Sink1.ForwardOnError(Exception error) in //Rx.NET/Source/src/System.Reactive/Internal/Sink.cs:line 61 at OpenAPI.Net.OpenClient.OnError(Exception exception) --- End of stack trace from previous location --- at System.Reactive.AnonymousSafeObserver1.OnError(Exception error) in //Rx.NET/Source/src/System.Reactive/AnonymousSafeObserver.cs:line 65
at System.Reactive.Sink`1.ForwardOnError(Exception error) in /
/Rx.NET/Source/src/System.Reactive/Internal/Sink.cs:line 61
at OpenAPI.Net.OpenClient.OnError(Exception exception)

Despite our best efforts, bugs can slip into releases or corner cases forgotten about. We will try our best to remedy the situation
and/or provide workarounds. Note that certain (odd) behaviors are by design and as such are not considered bugs.

Which library version? last release

What are the platform(s), environment(s) and related component version(s)? dotnet

What is the use case or problem? Stream get sometimes canced

What is the expected outcome? transfer data as complete

What is the actual outcome? Stream will be closed

What is the stacktrace of the exception(s) if any?

How can i fix it?

@amusleh-spotware-com
Copy link
Member

Hi,

It can happen sometimes if the server goes down temporarily or your internet, when it happens try to reconnect, or better add reconnect / retry policy by using something like Polly.

@Trades-King
Copy link
Author

hi,
my connection cant be. I ping scorce.
I must be a code issue.

BR

Daniel

@Trades-King
Copy link
Author

how use polly here? i use original client code.

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