summaryrefslogtreecommitdiff
path: root/pkg/worker/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/worker/worker.go')
-rwxr-xr-xpkg/worker/worker.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/worker/worker.go b/pkg/worker/worker.go
index 69c438b0..2044d0e7 100755
--- a/pkg/worker/worker.go
+++ b/pkg/worker/worker.go
@@ -181,12 +181,13 @@ func (w *Process) closeRelay() error {
// Stop sends soft termination command to the Process and waits for process completion.
func (w *Process) Stop() error {
- var err error
+ const op = errors.Op("process_stop")
w.state.Set(StateStopping)
- err = multierr.Append(err, internal.SendControl(w.relay, &internal.StopCommand{Stop: true}))
+ err := internal.SendControl(w.relay, &internal.StopCommand{Stop: true})
if err != nil {
w.state.Set(StateKilling)
- return multierr.Append(err, w.cmd.Process.Signal(os.Kill))
+ _ = w.cmd.Process.Signal(os.Kill)
+ return errors.E(op, errors.Network, err)
}
w.state.Set(StateStopped)
return nil