mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-10 18:05:48 +02:00
fix(node-record): concurrent map read and write
This commit is contained in:
parent
ae8646ebfc
commit
c4b8b8f088
1 changed files with 2 additions and 2 deletions
|
@ -129,11 +129,11 @@ func RetrieveNodesStatus(ctx context.Context) {
|
|||
default:
|
||||
if err := nodeAnalyticRecord(e, ctx); err != nil {
|
||||
logger.Error(err)
|
||||
if NodeMap[env.ID] != nil {
|
||||
mutex.Lock()
|
||||
if NodeMap[env.ID] != nil {
|
||||
NodeMap[env.ID].Status = false
|
||||
mutex.Unlock()
|
||||
}
|
||||
mutex.Unlock()
|
||||
select {
|
||||
case <-retryTicker.C:
|
||||
case <-ctx.Done():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue