feat: implement channel-specific locking for thread-safe polling

This commit is contained in:
CaIon
2025-08-04 20:44:19 +08:00
parent c00f5a17c8
commit 8cce3cc84a
2 changed files with 7 additions and 3 deletions

View File

@@ -1107,6 +1107,10 @@ func ManageMultiKeys(c *gin.Context) {
return
}
lock := model.GetChannelPollingLock(channel.Id)
lock.Lock()
defer lock.Unlock()
switch request.Action {
case "get_key_status":
keys := channel.GetKeys()