Merge pull request #1507 from QuantumNous/multi-key-manage

feat: implement channel-specific locking for thread-safe polling
This commit is contained in:
Calcium-Ion
2025-08-05 20:40:26 +08:00
committed by GitHub
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()