🐞 fix: 修复 data race, cause by wrong agent id

This commit is contained in:
lyyyuna 2021-09-09 17:35:14 +08:00 committed by Li Yiyang
parent 353957202b
commit d4c0c37202

View File

@ -191,7 +191,7 @@ func (gs *gocServer) register(c *gin.Context) {
log.Infof("one agent registered, id: %v, cmdline: %v, pid: %v, hostname: %v", id, agent.CmdLine, agent.Pid, agent.Hostname)
c.JSON(http.StatusOK, gin.H{
"id": strconv.Itoa(int(gs.idCount)),
"id": id,
"token": token,
})
}