Merge pull request #255 from xiangli-cmu/0.2-fix-devlist-issue

0.2 fix devlist issue
This commit is contained in:
Xiang Li 2013-10-20 10:29:29 -07:00
commit 61f238f22e
2 changed files with 4 additions and 1 deletions

View File

@ -20,7 +20,8 @@ func decodeJsonRequest(req *http.Request, data interface{}) error {
func redirect(hostname string, w http.ResponseWriter, req *http.Request) {
path := req.URL.Path
url := hostname + path
query := req.URL.RawQuery
url := hostname + path + "?" + query
log.Debugf("Redirect to %s", url)
http.Redirect(w, req, url, http.StatusTemporaryRedirect)
}

View File

@ -306,6 +306,8 @@ func (s *store) Update(nodePath string, newValue string, expireTime time.Time, i
// update ttl
n.UpdateTTL(expireTime)
e.Value = newValue
e.Expiration, e.TTL = n.ExpirationAndTTL()
s.WatcherHub.notify(e)