From 7e485c92cd7b745d4a0926c905e20dc68569ffbd Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sun, 28 Jan 2018 15:49:05 +0300 Subject: stop by worker --- socket_factory.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'socket_factory.go') diff --git a/socket_factory.go b/socket_factory.go index 161712e0..a77758e9 100644 --- a/socket_factory.go +++ b/socket_factory.go @@ -40,9 +40,9 @@ func NewSocketFactory(ls net.Listener, tout time.Duration) *SocketFactory { } // SpawnWorker creates worker and connects it to appropriate relay or returns error -func (f *SocketFactory) SpawnWorker(cmd *exec.Cmd) (w *Worker, workerError error) { - if w, workerError = newWorker(cmd); workerError != nil { - return nil, workerError +func (f *SocketFactory) SpawnWorker(cmd *exec.Cmd) (w *Worker, err error) { + if w, err = newWorker(cmd); err != nil { + return nil, err } if err := w.Start(); err != nil { -- cgit v1.2.3