Skip to content

Commit a775409

Browse files
committed
[-] fix nil pointer dereference
1 parent 11aebf6 commit a775409

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

checker/patroni_leader_checker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func (c *PatroniLeaderChecker) GetChangeNotificationStream(ctx context.Context,
2929
select {
3030
case <-ctx.Done():
3131
return nil
32-
case <-time.After(time.Duration(cConf.Interval) * time.Millisecond):
32+
case <-time.After(time.Duration(c.Interval) * time.Millisecond):
3333
r, err := http.Get(c.Endpoints[0] + c.Key)
3434
if err != nil {
3535
log.Printf("patroni REST API error: %s", err)

0 commit comments

Comments
 (0)