mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
refactor add comments for receiving expire commands
This commit is contained in:
@@ -60,6 +60,9 @@ func GetHandler(w http.ResponseWriter, req *http.Request, s Server) error {
|
|||||||
case <-closeChan:
|
case <-closeChan:
|
||||||
return nil
|
return nil
|
||||||
case event = <-eventChan:
|
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 {
|
if event != nil && event.Action == store.Expire {
|
||||||
events = append(events, event)
|
events = append(events, event)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user