Skip to content

Commit

Permalink
Reordering of switch cases for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
tc-hib committed Jul 14, 2021
1 parent 952f8bd commit 405258f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ func (c *Conn) checkBadConn(err error, mayRetry bool) error {
c.connectionGood = false
err.sqlError.badConn = mayRetry
return err
case net.Error, StreamError:
c.connectionGood = false
case Error:
err.badConn = mayRetry && !c.connectionGood
return err
case net.Error, StreamError:
c.connectionGood = false
}

if !c.connectionGood {
Expand Down

0 comments on commit 405258f

Please sign in to comment.