diff --git a/mssql.go b/mssql.go index e37109cd..5d815169 100644 --- a/mssql.go +++ b/mssql.go @@ -613,11 +613,13 @@ loop: break loop case doneStruct: if token.isError() { + cancel() return nil, s.c.checkBadConn(token.getError()) } case ReturnStatus: s.c.setReturnStatus(token) case error: + cancel() return nil, s.c.checkBadConn(token) } }