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 metalinter_test: tools
@gometalinter --install @gometalinter --install
gometalinter --vendor --deadline=600s --disable-all \ gometalinter --vendor --deadline=600s --disable-all \
--enable=aligncheck \
--enable=deadcode \ --enable=deadcode \
--enable=gas \ --enable=gas \
--enable=goimports \ --enable=goimports \
@ -70,7 +71,6 @@ metalinter_test: tools
--enable=varcheck \ --enable=varcheck \
./... ./...
#--enable=aligncheck \
#--enable=dupl \ #--enable=dupl \
#--enable=errcheck \ #--enable=errcheck \
#--enable=goconst \ #--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 { func (cli *grpcClient) OnStart() error {
cli.BaseService.OnStart()
if err := cli.BaseService.OnStart(); err != nil {
return err
}
RETRY_LOOP: RETRY_LOOP:
for { 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 { func (cli *socketClient) OnStart() error {
cli.BaseService.OnStart()
if err := cli.BaseService.OnStart(); err != nil {
return err
}
var err error var err error
var conn net.Conn 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 // OnStart starts the gRPC service
func (s *GRPCServer) OnStart() error { 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) ln, err := net.Listen(s.proto, s.addr)
if err != nil { if err != nil {
return err 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 { 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) ln, err := net.Listen(s.proto, s.addr)
if err != nil { if err != nil {
return err return err


Loading…
Cancel
Save