[tm-monitor] fix blocking issue

as you can see the mistake is that we listen for quit instead of closing
it.
This commit is contained in:
Anton Kaliaev
2017-03-21 20:35:40 +04:00
parent dee06a92d9
commit 6e00ce9bbd
2 changed files with 3 additions and 7 deletions

View File

@ -140,8 +140,9 @@ func (em *EventMeter) Start() error {
return nil
}
// Stop stops the EventMeter.
func (em *EventMeter) Stop() {
<-em.quit
close(em.quit)
em.RegisterDisconnectCallback(nil) // so we don't try and reconnect
em.wsc.Stop() // close(wsc.Quit)