Browse Source

linter

pull/1780/head
Ethan Buchman 7 years ago
parent
commit
26d967af7e
2 changed files with 8 additions and 4 deletions
  1. +2
    -2
      cmd/abci-cli/abci-cli.go
  2. +6
    -2
      server/socket_server.go

+ 2
- 2
cmd/abci-cli/abci-cli.go View File

@ -294,7 +294,7 @@ func cmdBatch(cmd *cobra.Command, args []string) error {
}
pArgs := persistentArgs(line)
out, err := exec.Command(pArgs[0], pArgs[1:]...).Output()
out, err := exec.Command(pArgs[0], pArgs[1:]...).Output() // nolint: gas
if err != nil {
return err
}
@ -316,7 +316,7 @@ func cmdConsole(cmd *cobra.Command, args []string) error {
}
pArgs := persistentArgs(line)
out, err := exec.Command(pArgs[0], pArgs[1:]...).Output()
out, err := exec.Command(pArgs[0], pArgs[1:]...).Output() // nolint: gas
if err != nil {
return err
}


+ 6
- 2
server/socket_server.go View File

@ -56,13 +56,17 @@ func (s *SocketServer) OnStart() error {
func (s *SocketServer) OnStop() {
s.BaseService.OnStop()
s.listener.Close()
if err := s.listener.Close(); err != nil {
s.Logger.Error("Error closing listener", "err", err)
}
s.connsMtx.Lock()
defer s.connsMtx.Unlock()
for id, conn := range s.conns {
delete(s.conns, id)
conn.Close()
if err := conn.Close(); err != nil {
s.Logger.Error("Error closing connection", "id", id, "conn", conn, "err", err)
}
}
}


Loading…
Cancel
Save