Skip to content

Commit

Permalink
middleware: fix waitForLeader in redirector panic (#8407)
Browse files Browse the repository at this point in the history
close #8406

Signed-off-by: husharp <[email protected]>
  • Loading branch information
HuSharp committed Jul 17, 2024
1 parent cbba49a commit ecaef02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/utils/apiutil/serverapi/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (h *redirector) waitForLeader(r *http.Request) (leader *pdpb.Member) {
}
case <-r.Context().Done():
return
case <-h.s.LoopContext().Done():
case <-h.s.Context().Done():
return
}
}
Expand Down

0 comments on commit ecaef02

Please sign in to comment.