You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered a crash when calling ITwitchClient.Disconnect() where TcpClient.Close() (all implementations) will throw when disposing of the StreamWriter. This seems to be caused by the line before that disposes of the client's StreamReader which indirectly closes the SslStream shared with the StreamWriter.
The text was updated successfully, but these errors were encountered:
Relevant stacktrace (bot is run inside a hosted service, hence the references):
Unhandled exception. System.AggregateException: One or more hosted services failed to stop. (Cannot access a disposed object.
Object name: 'SslStream'.)
---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'SslStream'.
at System.Net.Security.SslStream.<ThrowIfExceptional>g__ThrowExceptional|137_0(ExceptionDispatchInfo e)
at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at TwitchLib.Communication.Clients.TcpClient.Close(Boolean callDisconnect)
at TwitchLib.Client.TwitchClient.Disconnect()
(removed for brevity)
I've encountered a crash when calling
ITwitchClient.Disconnect()
whereTcpClient.Close()
(all implementations) will throw when disposing of the StreamWriter. This seems to be caused by the line before that disposes of the client'sStreamReader
which indirectly closes theSslStream
shared with theStreamWriter
.The text was updated successfully, but these errors were encountered: