From 3e669ef81e01b20bc1b75ac82485156cad60b598 Mon Sep 17 00:00:00 2001 From: galih rivanto Date: Tue, 28 May 2019 16:17:22 +0700 Subject: [PATCH] fix race while broadcasting outpack --- worker/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/worker.go b/worker/worker.go index 04f4914..7ca1389 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -72,7 +72,7 @@ func (worker *Worker) AddServer(net, addr string) (err error) { // Broadcast an outpack to all Gearman server. func (worker *Worker) broadcast(outpack *outPack) { for _, v := range worker.agents { - v.write(outpack) + v.Write(outpack) } }