Skip to content

Commit 720262a

Browse files
authored
Merge pull request #174 from Icinga/fix-false-reconnect-message
Show reconnect message after first reconnect
2 parents cea206d + 40e9f90 commit 720262a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/database/driver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (c RetryConnector) Connect(ctx context.Context) (driver.Conn, error) {
4444
}
4545
},
4646
OnSuccess: func(elapsed time.Duration, attempt uint64, _ error) {
47-
if attempt > 0 {
47+
if attempt > 1 {
4848
c.driver.Logger.Info("Reconnected to database")
4949
// c.driver.Logger.Info(1, "Reconnected to database",
5050
// zap.Duration("after", elapsed), zap.Uint64("attempts", attempt+1))

0 commit comments

Comments
 (0)