C# WPF App - Exception on closing application

0

I have a problem with exception appearing while closing my WPF application.

  HResult=0x80131515
  Message=The Read method cannot be called when another read operation is pending.
  Source=System
  StackTrace:
   at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.TimedStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlDataReader.Close()
   at MySql.Data.MySqlClient.MySqlConnection.Close()
   at MySql.Data.MySqlClient.MySqlConnection.Dispose(Boolean disposing)
   at MySql.Data.MySqlClient.MySqlConnection.Finalize()

  This exception was originally thrown at this call stack:
    [External Code]
  • I am using MySQL.Data version 8.0.20
  • It appears only, when some MySQL queries working in background (like Select's from DB)
  • I am using the 'using' statements when the program opening MySQL Connections to close MySQL Connections after operations are done.

has anyone encountered this problem?

c#
wpf
mysql.data
asked on Stack Overflow May 4, 2020 by Venzonite

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0