fix race while broadcasting outpack
This commit is contained in:
parent
5ba52de63c
commit
3e669ef81e
@ -72,7 +72,7 @@ func (worker *Worker) AddServer(net, addr string) (err error) {
|
|||||||
// Broadcast an outpack to all Gearman server.
|
// Broadcast an outpack to all Gearman server.
|
||||||
func (worker *Worker) broadcast(outpack *outPack) {
|
func (worker *Worker) broadcast(outpack *outPack) {
|
||||||
for _, v := range worker.agents {
|
for _, v := range worker.agents {
|
||||||
v.write(outpack)
|
v.Write(outpack)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user