Skip to content

Commit

Permalink
Log the error from DB ping check properly (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshalsall authored Feb 21, 2022
1 parent 16db6b5 commit db9cc68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ func NewDB(dsn string, logger log.Logger) (*sql.DB, error) {

tries := retryAttempts
for {
if err := db.Ping(); err == nil {
err := db.Ping()
if err == nil {
break
}

Expand Down

0 comments on commit db9cc68

Please sign in to comment.