Skip to content

Commit

Permalink
fix: let the service restart after leader switched (#1513)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Wang <whynowy@gmail.com>
  • Loading branch information
whynowy committed Jan 12, 2022
1 parent 57bdb37 commit 64621a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eventsources/eventing.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func (e *EventSourceAdaptor) Start(ctx context.Context) error {
}
},
OnStoppedLeading: func() {
log.Infof("leader lost: %s", e.hostname)
log.Fatalf("leader lost: %s", e.hostname)
},
})

Expand Down
2 changes: 1 addition & 1 deletion sensors/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (sensorCtx *SensorContext) Start(ctx context.Context) error {
}
},
OnStoppedLeading: func() {
log.Infof("leader lost: %s", sensorCtx.hostname)
log.Fatalf("leader lost: %s", sensorCtx.hostname)
},
})
return nil
Expand Down

0 comments on commit 64621a5

Please sign in to comment.