lint: enable errcheck (#5336)

## Description

Enable errcheck linter throughout the codebase

Closes: #5059
This commit is contained in:
Marko
2020-09-07 17:03:18 +02:00
committed by GitHub
parent 3359e0bf2f
commit 0ed8dba991
39 changed files with 346 additions and 137 deletions

View File

@@ -71,7 +71,11 @@ func BroadcastTxCommit(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadc
env.Logger.Error("Error on broadcast_tx_commit", "err", err)
return nil, err
}
defer env.EventBus.Unsubscribe(context.Background(), subscriber, q)
defer func() {
if err := env.EventBus.Unsubscribe(context.Background(), subscriber, q); err != nil {
env.Logger.Error("Error unsubscribing from eventBus", "err", err)
}
}()
// Broadcast tx and wait for CheckTx result
checkTxResCh := make(chan *abci.Response, 1)