Skip to content

Commit

Permalink
fix: continue leader failed should close leader component
Browse files Browse the repository at this point in the history
  • Loading branch information
yannan authored May 10, 2024
1 parent 6ddfd94 commit 369e880
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (l *LeaderChangedHandler) Handle(cxt context.Context, e goevent.Event) {
log.Println("leader initial")
}
// continue leader failed
if !lcEvent.IsLeader && len(l.leaderCloser) == 0 {
if !lcEvent.IsLeader && len(l.leaderCloser) != 0 {

Check warning on line 155 in fastflow.go

View check run for this annotation

Codecov / codecov/patch

fastflow.go#L155

Added line #L155 was not covered by tests
l.Close()
}
}
Expand Down

0 comments on commit 369e880

Please sign in to comment.