This commit is contained in:
Ethan Buchman
2017-11-27 20:42:30 +00:00
parent 5a46675185
commit 26d967af7e
2 changed files with 8 additions and 4 deletions

View File

@ -294,7 +294,7 @@ func cmdBatch(cmd *cobra.Command, args []string) error {
} }
pArgs := persistentArgs(line) 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 { if err != nil {
return err return err
} }
@ -316,7 +316,7 @@ func cmdConsole(cmd *cobra.Command, args []string) error {
} }
pArgs := persistentArgs(line) 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 { if err != nil {
return err return err
} }

View File

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