ack handling

master
Alex 2022-03-18 23:47:34 +01:00
parent 3891bde8e0
commit 9f19a3e71f
1 changed files with 3 additions and 3 deletions

View File

@ -132,15 +132,15 @@ func getMessageFromReceivedQueueByCmdID(receivedQueueMessages []*ReceivedQueueMe
} }
func (webClient *WebClient) RemoveMessageFromVoiceSendQueueByCmdID(cmdID int) { func (webClient *WebClient) RemoveMessageFromVoiceSendQueueByCmdID(cmdID int) {
removeMessageFromSendQueueByCmdID(webClient.SendVoiceQueueMessages, &webClient.sendVoiceQueueMessagesMu, cmdID) webClient.SendVoiceQueueMessages = removeMessageFromSendQueueByCmdID(webClient.SendVoiceQueueMessages, &webClient.sendVoiceQueueMessagesMu, cmdID)
logger.WebVoice.Warnln("RemoveMessageFromVoiceSendQueueByCmdID list", webClient.SendVoiceQueueMessages) logger.WebVoice.Warnln("RemoveMessageFromVoiceSendQueueByCmdID list", webClient.SendVoiceQueueMessages)
} }
func (webClient *WebClient) RemoveMessageFromMobileSendQueueByCmdID(cmdID int) { func (webClient *WebClient) RemoveMessageFromMobileSendQueueByCmdID(cmdID int) {
removeMessageFromSendQueueByCmdID(webClient.SendMobileQueueMessages, &webClient.sendMobileQueueMessagesMu, cmdID) webClient.SendMobileQueueMessages = removeMessageFromSendQueueByCmdID(webClient.SendMobileQueueMessages, &webClient.sendMobileQueueMessagesMu, cmdID)
} }
func removeMessageFromSendQueueByCmdID(queueMessages []*SendQueueMessage, mutex *sync.Mutex, cmdID int) { func removeMessageFromSendQueueByCmdID(queueMessages []*SendQueueMessage, mutex *sync.Mutex, cmdID int) []*SendQueueMessage {
mutex.Lock() mutex.Lock()
defer mutex.Unlock() defer mutex.Unlock()