mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
check for error when stopping WSClient
This commit is contained in:
parent
69b5da766c
commit
c6b2334fa3
@ -170,9 +170,11 @@ func (c *WSClient) OnStop() {}
|
|||||||
// channel is closed.
|
// channel is closed.
|
||||||
func (c *WSClient) Stop() error {
|
func (c *WSClient) Stop() error {
|
||||||
err := c.BaseService.Stop()
|
err := c.BaseService.Stop()
|
||||||
// only close user-facing channels when we can't write to them
|
if err == nil {
|
||||||
c.wg.Wait()
|
// only close user-facing channels when we can't write to them
|
||||||
close(c.ResponsesCh)
|
c.wg.Wait()
|
||||||
|
close(c.ResponsesCh)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user