diff options
author | Valery Piashchynski <[email protected]> | 2019-11-17 15:32:26 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2019-11-17 15:32:26 +0300 |
commit | 492faef8e51fce243216758baa8c16b4173603df (patch) | |
tree | da6376fba9a9af3358017dcbd5034677192f407b /socket_factory.go | |
parent | b81f2b121eb3a49372662d0bc9c19c53366f33fc (diff) |
complete half
Diffstat (limited to 'socket_factory.go')
-rw-r--r-- | socket_factory.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/socket_factory.go b/socket_factory.go index 43059e8a..8a1b4d67 100644 --- a/socket_factory.go +++ b/socket_factory.go @@ -51,7 +51,12 @@ func (f *SocketFactory) SpawnWorker(cmd *exec.Cmd) (w *Worker, err error) { rl, err := f.findRelay(w, f.tout) if err != nil { - go func(w *Worker) { w.Kill() }(w) + go func(w *Worker) { + err := w.Kill() + if err != nil { + fmt.Println(fmt.Errorf("error killing the worker %w", err)) + } + }(w) if wErr := w.Wait(); wErr != nil { if _, ok := wErr.(*exec.ExitError); ok { |