This commit is contained in:
Pär Karlsson 2015-07-29 17:58:33 +02:00
parent bb8e0a9d84
commit 68400171ac

View File

@ -62,7 +62,7 @@ func Open(dialect string, args ...interface{}) (DB, error) {
// For some reason, postgres does not throw an connection error. // For some reason, postgres does not throw an connection error.
// Sending a ping request after the connection is made is a quick workaround for this // Sending a ping request after the connection is made is a quick workaround for this
if driver == "postgres" && err != nil { if driver == "postgres" && err == nil {
err = db.DB().Ping() err = db.DB().Ping()
} }