release-0.4
Xiang Li 2013-07-12 08:56:10 -07:00
parent 33872501cf
commit 00d2d6eb4e
2 changed files with 6 additions and 6 deletions

View File

@ -90,9 +90,9 @@ const (
const (
ELECTIONTIMTOUT = 200 * time.Millisecond
HEARTBEATTIMEOUT = 50 * time.Millisecond
// Timeout for internal raft http connection
// The original timeout for http is 45 seconds
// The original timeout for http is 45 seconds
// which is too long for our usage.
HTTPTIMEOUT = time.Second
)

View File

@ -102,12 +102,12 @@ func (t transporter) GetLeaderClientAddress() string {
// Send server side POST request
func (t transporter) Post(path string, body io.Reader) (*http.Response, error) {
resp, err := t.client.Post(t.scheme + path, "application/json", body)
return resp, err
resp, err := t.client.Post(t.scheme+path, "application/json", body)
return resp, err
}
// Send server side GET request
func (t transporter) Get(path string) (*http.Response, error) {
resp, err := t.client.Get(t.scheme + path)
return resp, err
resp, err := t.client.Get(t.scheme + path)
return resp, err
}