Browse Source

linting: catch some errors

pull/1780/head
Zach Ramsay 7 years ago
committed by Ethan Buchman
parent
commit
36e96c5bf1
5 changed files with 13 additions and 5 deletions
  1. +1
    -1
      Makefile
  2. +3
    -1
      client/grpc_client.go
  3. +3
    -1
      client/socket_client.go
  4. +3
    -1
      server/grpc_server.go
  5. +3
    -1
      server/socket_server.go

+ 1
- 1
Makefile View File

@ -58,6 +58,7 @@ metalinter: tools
metalinter_test: tools
@gometalinter --install
gometalinter --vendor --deadline=600s --disable-all \
--enable=aligncheck \
--enable=deadcode \
--enable=gas \
--enable=goimports \
@ -70,7 +71,6 @@ metalinter_test: tools
--enable=varcheck \
./...
#--enable=aligncheck \
#--enable=dupl \
#--enable=errcheck \
#--enable=goconst \


+ 3
- 1
client/grpc_client.go View File

@ -41,7 +41,9 @@ func dialerFunc(addr string, timeout time.Duration) (net.Conn, error) {
}
func (cli *grpcClient) OnStart() error {
cli.BaseService.OnStart()
if err := cli.BaseService.OnStart(); err != nil {
return err
}
RETRY_LOOP:
for {


+ 3
- 1
client/socket_client.go View File

@ -57,7 +57,9 @@ func NewSocketClient(addr string, mustConnect bool) *socketClient {
}
func (cli *socketClient) OnStart() error {
cli.BaseService.OnStart()
if err := cli.BaseService.OnStart(); err != nil {
return err
}
var err error
var conn net.Conn


+ 3
- 1
server/grpc_server.go View File

@ -37,7 +37,9 @@ func NewGRPCServer(protoAddr string, app types.ABCIApplicationServer) cmn.Servic
// OnStart starts the gRPC service
func (s *GRPCServer) OnStart() error {
s.BaseService.OnStart()
if err := s.BaseService.OnStart(); err != nil {
return err
}
ln, err := net.Listen(s.proto, s.addr)
if err != nil {
return err


+ 3
- 1
server/socket_server.go View File

@ -44,7 +44,9 @@ func NewSocketServer(protoAddr string, app types.Application) cmn.Service {
}
func (s *SocketServer) OnStart() error {
s.BaseService.OnStart()
if err := s.BaseService.OnStart(); err != nil {
return err
}
ln, err := net.Listen(s.proto, s.addr)
if err != nil {
return err


Loading…
Cancel
Save