mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #2034 from yichengq/276
etcdhttp: reset serve and watch timeout
This commit is contained in:
commit
cb5bff5b05
@ -19,6 +19,7 @@ package etcdhttp
|
||||
import (
|
||||
"errors"
|
||||
"log"
|
||||
"math"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
@ -29,10 +30,13 @@ import (
|
||||
|
||||
const (
|
||||
// time to wait for response from EtcdServer requests
|
||||
defaultServerTimeout = 5 * time.Minute
|
||||
// 5s for disk and network delay + 10*heartbeat for commit and possible
|
||||
// leader switch
|
||||
// TODO: use heartbeat set in etcdserver
|
||||
defaultServerTimeout = 5*time.Second + 10*(100*time.Millisecond)
|
||||
|
||||
// time to wait for a Watch request
|
||||
defaultWatchTimeout = 5 * time.Minute
|
||||
defaultWatchTimeout = time.Duration(math.MaxInt64)
|
||||
)
|
||||
|
||||
var errClosed = errors.New("etcdhttp: client closed connection")
|
||||
|
Loading…
x
Reference in New Issue
Block a user