mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-28 13:41:21 +00:00
[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:
parent
dee06a92d9
commit
6e00ce9bbd
@ -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)
|
||||
|
@ -121,12 +121,7 @@ func (n *Node) Start() error {
|
||||
func (n *Node) Stop() {
|
||||
n.Online = false
|
||||
|
||||
n.em.RegisterLatencyCallback(nil)
|
||||
n.em.Unsubscribe(tmtypes.EventStringNewBlockHeader())
|
||||
n.em.RegisterDisconnectCallback(nil)
|
||||
|
||||
// FIXME stop blocks at event_meter.go:140
|
||||
// n.em.Stop()
|
||||
n.em.Stop()
|
||||
|
||||
close(n.quit)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user