diff options
Diffstat (limited to 'vendor/github.com/lib/pq/error.go')
-rw-r--r-- | vendor/github.com/lib/pq/error.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/lib/pq/error.go b/vendor/github.com/lib/pq/error.go index 96aae29c65..3d66ba7c52 100644 --- a/vendor/github.com/lib/pq/error.go +++ b/vendor/github.com/lib/pq/error.go @@ -478,13 +478,13 @@ func errRecoverNoErrBadConn(err *error) { } } -func (c *conn) errRecover(err *error) { +func (cn *conn) errRecover(err *error) { e := recover() switch v := e.(type) { case nil: // Do nothing case runtime.Error: - c.bad = true + cn.bad = true panic(v) case *Error: if v.Fatal() { @@ -493,7 +493,7 @@ func (c *conn) errRecover(err *error) { *err = v } case *net.OpError: - c.bad = true + cn.bad = true *err = v case error: if v == io.EOF || v.(error).Error() == "remote error: handshake failure" { @@ -503,13 +503,13 @@ func (c *conn) errRecover(err *error) { } default: - c.bad = true + cn.bad = true panic(fmt.Sprintf("unknown error: %#v", e)) } // Any time we return ErrBadConn, we need to remember it since *Tx doesn't // mark the connection bad in database/sql. if *err == driver.ErrBadConn { - c.bad = true + cn.bad = true } } |