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)