Skip to content

Commit

Permalink
[-] fix nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Oct 18, 2024
1 parent 20fa83a commit 6d5ada3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion checker/patroni_leader_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (c *PatroniLeaderChecker) GetChangeNotificationStream(ctx context.Context,
select {
case <-ctx.Done():
return nil
case <-time.After(time.Duration(cConf.Interval) * time.Millisecond):
case <-time.After(time.Duration(c.Interval) * time.Millisecond):
r, err := http.Get(c.Endpoints[0] + c.Key)
if err != nil {
log.Printf("patroni REST API error: %s", err)
Expand Down

0 comments on commit 6d5ada3

Please sign in to comment.