diff options
author | Wolfy-J <[email protected]> | 2019-05-02 18:35:18 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-05-02 18:35:18 +0300 |
commit | b3e7bbccdd7636b6ce7d90cf4f295e498feb719c (patch) | |
tree | 4db686c678bf7e4ee4e69e4443f34c46d7f26bea /worker.go | |
parent | eb8c64941cbcd30ff79b6147efd5fef42eccb648 (diff) |
miiiinor performance optimizations
Diffstat (limited to 'worker.go')
-rw-r--r-- | worker.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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") } |