mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix put ttl
This commit is contained in:
parent
63456b5c4b
commit
1fb3799118
@ -72,10 +72,11 @@ func PutHandler(w http.ResponseWriter, req *http.Request, s Server) error {
|
||||
}
|
||||
|
||||
c = &store.CompareAndSwapCommand{
|
||||
Key: key,
|
||||
Value: value,
|
||||
PrevValue: prevValue,
|
||||
PrevIndex: prevIndex,
|
||||
Key: key,
|
||||
Value: value,
|
||||
PrevValue: prevValue,
|
||||
PrevIndex: prevIndex,
|
||||
ExpireTime: expireTime,
|
||||
}
|
||||
|
||||
return s.Dispatch(c, w, req)
|
||||
|
@ -372,8 +372,8 @@ func (n *Node) UpdateTTL(expireTime time.Time) {
|
||||
}
|
||||
}
|
||||
|
||||
n.ExpireTime = expireTime
|
||||
if expireTime.Sub(Permanent) != 0 {
|
||||
n.ExpireTime = expireTime
|
||||
n.Expire()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user