mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
commit
5feef73a17
11
elog/elog.go
11
elog/elog.go
@ -1,11 +0,0 @@
|
|||||||
package elog
|
|
||||||
|
|
||||||
import (
|
|
||||||
. "log"
|
|
||||||
"runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TODO() {
|
|
||||||
_, file, line, _ := runtime.Caller(1)
|
|
||||||
Printf("TODO: %s:%d", file, line)
|
|
||||||
}
|
|
@ -10,7 +10,6 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/coreos/etcd/elog"
|
|
||||||
"github.com/coreos/etcd/raft/raftpb"
|
"github.com/coreos/etcd/raft/raftpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -146,12 +145,12 @@ func send(c *http.Client, scheme string, p Peers, m raftpb.Message) {
|
|||||||
func httpPost(c *http.Client, url string, data []byte) bool {
|
func httpPost(c *http.Client, url string, data []byte) bool {
|
||||||
resp, err := c.Post(url, "application/protobuf", bytes.NewBuffer(data))
|
resp, err := c.Post(url, "application/protobuf", bytes.NewBuffer(data))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
elog.TODO()
|
// TODO: log the error?
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
if resp.StatusCode != http.StatusNoContent {
|
if resp.StatusCode != http.StatusNoContent {
|
||||||
elog.TODO()
|
// TODO: log the error?
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user