From 9f19a3e71fe586c134e1a515457ffed2f0a9663c Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 18 Mar 2022 23:47:34 +0100 Subject: [PATCH] ack handling --- modules/structs/WebClient.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/structs/WebClient.go b/modules/structs/WebClient.go index 6d8320a..c0a4040 100644 --- a/modules/structs/WebClient.go +++ b/modules/structs/WebClient.go @@ -132,15 +132,15 @@ func getMessageFromReceivedQueueByCmdID(receivedQueueMessages []*ReceivedQueueMe } 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) } 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() defer mutex.Unlock()