refactor add comments for receiving expire commands

This commit is contained in:
Xiang Li 2013-11-08 13:24:23 -08:00
parent b4f4528ef4
commit 5a4e764d7a

View File

@ -60,6 +60,9 @@ func GetHandler(w http.ResponseWriter, req *http.Request, s Server) error {
case <-closeChan:
return nil
case event = <-eventChan:
// for events other than expire, just one event for one watch
// for expire event, we might have a stream of events
// we use a nil item to terminate the expire event stream
if event != nil && event.Action == store.Expire {
events = append(events, event)
} else {