This commit is contained in:
geek 2017-05-16 13:06:39 +09:00
parent 5b9d23fdaa
commit 624e73c186

View File

@ -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)