fix race while broadcasting outpack

This commit is contained in:
galih rivanto 2019-05-28 16:17:22 +07:00
parent 5ba52de63c
commit 3e669ef81e

View File

@ -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)
}
}