فهرست منبع

fix: monitor data race

zijiren233 10 ماه پیش
والد
کامیت
5ccaa039bb
1فایلهای تغییر یافته به همراه0 افزوده شده و 4 حذف شده
  1. 0 4
      monitor/memmodel.go

+ 0 - 4
monitor/memmodel.go

@@ -220,8 +220,6 @@ func (m *MemModelMonitor) GetBannedChannelsWithModel(_ context.Context, model st
 		for channelID, channel := range data.channels {
 		for channelID, channel := range data.channels {
 			if channel.bannedUntil.After(now) {
 			if channel.bannedUntil.After(now) {
 				banned = append(banned, channelID)
 				banned = append(banned, channelID)
-			} else {
-				channel.bannedUntil = time.Time{}
 			}
 			}
 		}
 		}
 	}
 	}
@@ -242,8 +240,6 @@ func (m *MemModelMonitor) GetAllBannedModelChannels(_ context.Context) (map[stri
 					result[model] = []int64{}
 					result[model] = []int64{}
 				}
 				}
 				result[model] = append(result[model], channelID)
 				result[model] = append(result[model], channelID)
-			} else {
-				channel.bannedUntil = time.Time{}
 			}
 			}
 		}
 		}
 	}
 	}