diff options
author | Wolfy-J <[email protected]> | 2019-12-23 14:43:47 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-12-23 14:43:47 +0300 |
commit | c7b0a4a81827284f7565c56aa476eea34fb6382f (patch) | |
tree | ee30e93169c37fb058fbe55af6b3f954eabd9646 /worker.go | |
parent | 7f694966730f6dac09d0d0ea3bf51276b8e4dfe4 (diff) |
- test fixes
Diffstat (limited to 'worker.go')
-rw-r--r-- | worker.go | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -105,7 +105,9 @@ func (w *Worker) Wait() error { if runtime.GOOS != "windows" { // windows handles processes and close pipes differently, // we can ignore wait here as process.Wait() already being handled above - w.cmd.Wait() + if err := w.cmd.Wait(); err != nil { + return err + } } if w.endState.Success() { @@ -214,10 +216,16 @@ func (w *Worker) start() error { defer w.mu.Unlock() if w.rl != nil { - w.rl.Close() + err := w.rl.Close() + if err != nil { + w.err.lsn(EventWorkerError, WorkerError{Worker: w, Caused: err}) + } } - w.err.Close() + err := w.err.Close() + if err != nil { + w.err.lsn(EventWorkerError, WorkerError{Worker: w, Caused: err}) + } } }() |