Skip to content

Commit

Permalink
added go-sql-driver issue reference
Browse files Browse the repository at this point in the history
  • Loading branch information
thc committed May 18, 2021
1 parent 7b5c76f commit d578d9d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ func policyVerify(x connData, db *sql.DB) string {
dberr := db.Ping()
if dberr != nil {
xlog.Err("Skipping policyVerify db.Ping Error: " + dberr.Error())
// Ref : https://github.com/go-sql-driver/mysql/issues/921
db.Exec("SELECT NOW()") // Generate an error for db recovery
return "DUNNO" // always return DUNNO on error
}
Expand Down

0 comments on commit d578d9d

Please sign in to comment.