From e38d4e45890fde4c95c6d9db08fb1d7aca68caa4 Mon Sep 17 00:00:00 2001 From: Jack Youstra Date: Mon, 12 Dec 2022 17:45:57 -0600 Subject: [PATCH] Add back old ping-pong for legacy server support This fixes timeout problems with https://github.com/bolismauro/katanaMonitor-lib-swift --- Sources/ScClient/client.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/ScClient/client.swift b/Sources/ScClient/client.swift index 4a2a1f7..e6ad378 100644 --- a/Sources/ScClient/client.swift +++ b/Sources/ScClient/client.swift @@ -47,6 +47,8 @@ public class ScClient : Listener, WebSocketDelegate { public func websocketDidReceiveMessage(socket: WebSocketClient, text: String) { if (text == "") { socket.write(string: "") + } else if (text == "#1") { + socket.write(string: "#2") } else { if let messageObject = JSONConverter.deserializeString(message: text) { if let (data, rid, cid, eventName, error) = Parser.getMessageDetails(myMessage: messageObject) {