Send "live" event only if past events requested

This fixes a bug where the live events are recorded in the events log.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-02-29 11:18:11 -08:00
parent c242792f21
commit e8b602462a

View file

@ -169,11 +169,11 @@ func (s *Supervisor) Events(from time.Time) chan Event {
c <- e
}
}
}
// Notify the client that from now on it's live events
c <- Event{
Type: "live",
Timestamp: time.Now(),
// Notify the client that from now on it's live events
c <- Event{
Type: "live",
Timestamp: time.Now(),
}
}
return c
}