🐞 fix: 修复 data race, cause by wrong agent id
This commit is contained in:
parent
353957202b
commit
d4c0c37202
@ -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,
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user