Skip to content

Commit 3f9a6f4

Browse files
committed
refactor: simplify return error
1 parent ad88776 commit 3f9a6f4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

nsq.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,7 @@ func (w *Worker) Queue(job queue.QueuedMessage) error {
183183
return queue.ErrQueueShutdown
184184
}
185185

186-
err := w.p.Publish(w.opts.topic, job.Bytes())
187-
if err != nil {
188-
return err
189-
}
190-
191-
return nil
186+
return w.p.Publish(w.opts.topic, job.Bytes())
192187
}
193188

194189
// Request fetch new task from queue

0 commit comments

Comments
 (0)