fix put ttl

This commit is contained in:
Xiang Li 2013-10-26 21:04:44 -07:00
parent 63456b5c4b
commit 1fb3799118
2 changed files with 6 additions and 5 deletions

View File

@ -76,6 +76,7 @@ func PutHandler(w http.ResponseWriter, req *http.Request, s Server) error {
Value: value,
PrevValue: prevValue,
PrevIndex: prevIndex,
ExpireTime: expireTime,
}
return s.Dispatch(c, w, req)

View File

@ -372,8 +372,8 @@ func (n *Node) UpdateTTL(expireTime time.Time) {
}
}
if expireTime.Sub(Permanent) != 0 {
n.ExpireTime = expireTime
if expireTime.Sub(Permanent) != 0 {
n.Expire()
}
}