Skip to content

Commit

Permalink
Don't clobber FSM error in shutdown handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Mar 9, 2024
1 parent fe3d34d commit 0624366
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/fsm/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ type Action struct {
func Stop() Action {
return Action{func(m *fsm) {
m.current = nil
m.err = m.ctx.Err()
if m.err == nil {
m.err = m.ctx.Err()
}
}}
}

Expand Down

0 comments on commit 0624366

Please sign in to comment.