summaryrefslogtreecommitdiff
path: root/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker.go')
-rw-r--r--worker.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/worker.go b/worker.go
index 7221c2de..b01b362a 100644
--- a/worker.go
+++ b/worker.go
@@ -137,7 +137,7 @@ func (w *Worker) Stop() error {
defer w.mu.Unlock()
w.state.set(StateStopping)
- err := sendPayload(w.rl, &stopCommand{Stop: true})
+ err := sendControl(w.rl, &stopCommand{Stop: true})
<-w.waitDone
return err
@@ -221,7 +221,8 @@ func (w *Worker) start() error {
}
func (w *Worker) execPayload(rqs *Payload) (rsp *Payload, err error) {
- if err := sendPayload(w.rl, rqs.Context); err != nil {
+ // two things
+ if err := sendControl(w.rl, rqs.Context); err != nil {
return nil, errors.Wrap(err, "header error")
}