From 624e73c1866c58e6d6f18cabfa0e10b54d7a437e Mon Sep 17 00:00:00 2001 From: geek Date: Tue, 16 May 2017 13:06:39 +0900 Subject: [PATCH] sd --- event_sender.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/event_sender.go b/event_sender.go index b88eb41..5c77736 100644 --- a/event_sender.go +++ b/event_sender.go @@ -73,6 +73,10 @@ func Start(ch chan bool) (err error) { return nil } +func Stop() (err error) { + es := GetInstance() + es.stop() +} func AddEventData(event interface{}) { es := GetInstance() es.lq.PushItem(event) @@ -92,7 +96,7 @@ func (es *EventSender) start() { go es.checkQueue() } -func (es *EventSender) Stop() { +func (es *EventSender) stop() { if es.sc != nil { es.lq.Close() close(es.sc)