Merge pull request #133 from ch8o/ch8o

修复修改密钥后,agent连不上bug

Co-authored-by: ch8o <9103372+ch8o@users.noreply.github.com>
This commit is contained in:
naiba 2021-07-22 02:44:05 -06:00 committed by GitHub
commit bcb95ba718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,6 +174,8 @@ func (ma *memberAPI) addOrEditServer(c *gin.Context) {
dao.ServerLock.RLock()
s.Host = dao.ServerList[s.ID].Host
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.ServerLock.RUnlock()
} else {