-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
S:waitingStatus: Waiting for responseStatus: Waiting for responseT:bugType Bug (Confirmed)Type Bug (Confirmed)
Description
Currently we are using a WsClient in this manner, to monitor tendermint and collect metrics:
func(c *rpcClient.WSClient) error {
if c.IsRunning() {
c.Stop() // panics on close c.ResponsesCh when not started (=nil)
}
But c.Stop() does not close the underlying connection, which results in tendermint logging these errors:
E[08-22|09:35:58.903] Error closing connection module=rpc-server protocol=websocket remote=127.0.0.1:52428 err="close tcp 127.0.0.1:46657->127.0.0.1:52428: use of closed network connection"
My proposal would be to add c.conn.Close() to func (c *WSClient) OnStop() {} or Stop() .
I can contribute this myself too.
Let me know what you think.
FYI @ethanfrey
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
S:waitingStatus: Waiting for responseStatus: Waiting for responseT:bugType Bug (Confirmed)Type Bug (Confirmed)