fix crash when update fails to download fixes #33
This commit is contained in:
parent
588a4bcbf7
commit
4f01e214fd
3 changed files with 18 additions and 13 deletions
|
|
@ -481,7 +481,11 @@ func (a *Agent) RunRPC() {
|
|||
} else {
|
||||
ret.Encode("ok")
|
||||
msg.Respond(resp)
|
||||
a.AgentUpdate(p.Data["url"], p.Data["inno"], p.Data["version"])
|
||||
err := a.AgentUpdate(p.Data["url"], p.Data["inno"], p.Data["version"])
|
||||
if err != nil {
|
||||
atomic.StoreUint32(&agentUpdateLocker, 0)
|
||||
return
|
||||
}
|
||||
atomic.StoreUint32(&agentUpdateLocker, 0)
|
||||
nc.Flush()
|
||||
nc.Close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue