mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
gofmt
This commit is contained in:
parent
b71811375b
commit
f7dc48ad00
8
etcd.go
8
etcd.go
@ -259,10 +259,10 @@ func startEtcdTransport(info Info, scheme string, tlsConf tls.Config) {
|
||||
infof("etcd server [%s:%s]", info.Name, u)
|
||||
|
||||
server := http.Server{
|
||||
Handler: NewEtcdMuxer(),
|
||||
TLSConfig: &tlsConf,
|
||||
Addr: u.Host,
|
||||
}
|
||||
Handler: NewEtcdMuxer(),
|
||||
TLSConfig: &tlsConf,
|
||||
Addr: u.Host,
|
||||
}
|
||||
|
||||
if scheme == "http" {
|
||||
fatal(server.ListenAndServe())
|
||||
|
@ -165,7 +165,7 @@ func dispatch(c Command, w *http.ResponseWriter, req *http.Request, etcd bool) {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
leader := raftServer.Leader()
|
||||
leader := raftServer.Leader()
|
||||
// current no leader
|
||||
if leader == "" {
|
||||
(*w).WriteHeader(http.StatusInternalServerError)
|
||||
|
Loading…
x
Reference in New Issue
Block a user