Skip to content

InvalidOperationException thrown from Cancel #386

Closed
@bgrainger

Description

@bgrainger
System.InvalidOperationException: Expected state to be (Querying|CancelingQuery) but was Failed.
   at MySql.Data.Serialization.MySqlSession.VerifyState(State state1, State state2)
   at MySql.Data.Serialization.MySqlSession.TryStartCancel(MySqlCommand command)
   at MySql.Data.MySqlClient.MySqlConnection.Cancel(MySqlCommand command)
   at Dapper.SqlMapper.GridReader.Dispose()
   at [Class].<MethodAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---

It's possible that the command is timing out (and killing the connection). If so, Cancel should be a no-op.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions