mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 09:38:13 -05:00
Merge pull request #133 from ch8o/ch8o
修复修改密钥后,agent连不上bug Co-authored-by: ch8o <9103372+ch8o@users.noreply.github.com>
This commit is contained in:
commit
bcb95ba718
@ -174,6 +174,8 @@ func (ma *memberAPI) addOrEditServer(c *gin.Context) {
|
|||||||
dao.ServerLock.RLock()
|
dao.ServerLock.RLock()
|
||||||
s.Host = dao.ServerList[s.ID].Host
|
s.Host = dao.ServerList[s.ID].Host
|
||||||
s.State = dao.ServerList[s.ID].State
|
s.State = dao.ServerList[s.ID].State
|
||||||
|
dao.SecretToID[s.Secret] = s.ID
|
||||||
|
delete(dao.SecretToID, dao.ServerList[s.ID].Secret)
|
||||||
dao.ServerList[s.ID] = &s
|
dao.ServerList[s.ID] = &s
|
||||||
dao.ServerLock.RUnlock()
|
dao.ServerLock.RUnlock()
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user