From e8b602462a5dd03e4701da906478bd5882a0ac20 Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Mon, 29 Feb 2016 11:18:11 -0800 Subject: [PATCH] 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 --- supervisor/supervisor.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/supervisor/supervisor.go b/supervisor/supervisor.go index 7b11080..1d42525 100644 --- a/supervisor/supervisor.go +++ b/supervisor/supervisor.go @@ -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 }