mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix(server): dispatch SetClusterConfigCommand correctly
This commit is contained in:
parent
9af9438ed0
commit
c7116a37c0
@ -276,9 +276,9 @@ func (s *Server) Dispatch(c raft.Command, w http.ResponseWriter, req *http.Reque
|
||||
|
||||
var url string
|
||||
switch c.(type) {
|
||||
case *JoinCommandV1, *RemoveCommandV1:
|
||||
url, _ = ps.registry.PeerURL(leader)
|
||||
case *JoinCommandV2, *RemoveCommandV2:
|
||||
case *JoinCommandV1, *RemoveCommandV1,
|
||||
*JoinCommandV2, *RemoveCommandV2,
|
||||
*SetClusterConfigCommand:
|
||||
url, _ = ps.registry.PeerURL(leader)
|
||||
default:
|
||||
url, _ = ps.registry.ClientURL(leader)
|
||||
|
Loading…
x
Reference in New Issue
Block a user