mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-20 00:21:21 +00:00
gocritic (1/2) (#3836)
Add gocritic as a linter The linting is not complete, but should i complete in this PR or in a following. 23 files have been touched so it may be better to do in a following PR Commits: * Add gocritic to linting - Added gocritic to linting Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * gocritic * pr comments * remove switch in cmdBatch
This commit is contained in:
@ -127,11 +127,12 @@ func (s *SocketServer) acceptConnectionsRoutine() {
|
||||
|
||||
func (s *SocketServer) waitForClose(closeConn chan error, connID int) {
|
||||
err := <-closeConn
|
||||
if err == io.EOF {
|
||||
switch {
|
||||
case err == io.EOF:
|
||||
s.Logger.Error("Connection was closed by client")
|
||||
} else if err != nil {
|
||||
case err != nil:
|
||||
s.Logger.Error("Connection error", "error", err)
|
||||
} else {
|
||||
default:
|
||||
// never happens
|
||||
s.Logger.Error("Connection was closed.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user