mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 04:41:22 +00:00
add staticcheck linting (#3828)
cleanup to add linter grpc change: https://godoc.org/google.golang.org/grpc#WithContextDialer https://godoc.org/google.golang.org/grpc#WithDialer grpc/grpc-go#2627 prometheous change: due to UninstrumentedHandler, being deprecated in the future empty branch = empty if or else statement didn't delete them entirely but commented couldn't find a reason to have them could not replicate the issue #3406 but if want to keep it commented then we should comment out the if statement as well
This commit is contained in:
@ -369,10 +369,11 @@ func (c *WSClient) writeRoutine() {
|
||||
|
||||
defer func() {
|
||||
ticker.Stop()
|
||||
if err := c.conn.Close(); err != nil {
|
||||
// ignore error; it will trigger in tests
|
||||
// likely because it's closing an already closed connection
|
||||
}
|
||||
c.conn.Close()
|
||||
// err != nil {
|
||||
// ignore error; it will trigger in tests
|
||||
// likely because it's closing an already closed connection
|
||||
// }
|
||||
c.wg.Done()
|
||||
}()
|
||||
|
||||
@ -421,10 +422,11 @@ func (c *WSClient) writeRoutine() {
|
||||
// executing all reads from this goroutine.
|
||||
func (c *WSClient) readRoutine() {
|
||||
defer func() {
|
||||
if err := c.conn.Close(); err != nil {
|
||||
// ignore error; it will trigger in tests
|
||||
// likely because it's closing an already closed connection
|
||||
}
|
||||
c.conn.Close()
|
||||
// err != nil {
|
||||
// ignore error; it will trigger in tests
|
||||
// likely because it's closing an already closed connection
|
||||
// }
|
||||
c.wg.Done()
|
||||
}()
|
||||
|
||||
|
Reference in New Issue
Block a user