From 00a76f60765b82945ea1fd2279572183f145ffaa Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 15 Jun 2024 20:48:09 -0400 Subject: [PATCH] Fix issue that may cause outgoing commands to be sent twice The function for sending commands has an option to bypass flood control queue and go directly to socket. This is only used for PONG as of this commit which is why this issue has gone unnoticed for so long. When the flag bypassQueue was true, the PONG was being sent, but the function did not return afterwards, so the PONG was queued for another send afterwards. --- .../Classes/IRC/IRCConnection.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/XPC Services/IRC Remote Connection Manager/Classes/IRC/IRCConnection.swift b/XPC Services/IRC Remote Connection Manager/Classes/IRC/IRCConnection.swift index 423c0a716..0480a2e53 100644 --- a/XPC Services/IRC Remote Connection Manager/Classes/IRC/IRCConnection.swift +++ b/XPC Services/IRC Remote Connection Manager/Classes/IRC/IRCConnection.swift @@ -261,6 +261,8 @@ final class Connection: NSObject, ConnectionSocketDelegate if (bypassQueue) { send(data, removeFromQueue: false) + + return } sendQueue(add: data)