BogdanovKirill / RtspClientSharp

Pure C# RTSP client for .NET Standard without external dependencies and with true async nature. I welcome contributions.
MIT License
722 stars 286 forks source link

EndOfStreamException in debugging #24

Closed IvanovNiko closed 5 years ago

IvanovNiko commented 5 years ago

Hi.

I am recieving an exception below when I assign breakpoint in debugger an code debugging. What is meaning this exception?

RtspClientSharp.Rtsp.RtspClientException: Receive error ---> System.IO.EndOfStreamException: End of TPKT stream at RtspClientSharp.Tpkt.TpktStream.d9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RtspClientSharp.Tpkt.TpktStream.d7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RtspClientSharp.Rtsp.RtspClientInternal.d33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RtspClientSharp.Rtsp.RtspClientInternal.d18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at RtspClientSharp.RtspClient.d14.MoveNext() --- End of inner exception stack trace --- at RtspClientSharp.RtspClient.d14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult()

BogdanovKirill commented 5 years ago

It means that connection was closed by RTSP server because you program was suspended by debugger

IvanovNiko commented 5 years ago

Thanks. I understood. Is the recieve timeout a server option? Can it be assign on the client side?

IvanovNiko commented 5 years ago

I saw parameters in ConnectionParameters class: ConnectTimeout ReceiveTimeout

It seems that this is what I need.

BogdanovKirill commented 5 years ago

Thanks. I understood. Is the recieve timeout a server option? Can it be assign on the client side?

No. That timeouts should be adjusted on server side.

BogdanovKirill commented 5 years ago

I saw parameters in ConnectionParameters class: ConnectTimeout ReceiveTimeout

It seems that this is what I need.

It's your (client) timeouts, not server.

IvanovNiko commented 5 years ago

It's your (client) timeouts, not server. Ok, thanks.