File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
templates/swift/Sources/Services Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ open class Realtime : Service {
14
14
private var socketClient: WebSocketClient? = nil
15
15
private var activeChannels = Set<String >()
16
16
private var activeSubscriptions = [Int: RealtimeCallback]()
17
- private var heartbeatTask: Task<Void , Error >? = nil
17
+ private var heartbeatTask: Task<Void , Swift . Error >? = nil
18
18
19
19
let connectSync = DispatchQueue(label: "ConnectSync")
20
20
@@ -30,8 +30,8 @@ open class Realtime : Service {
30
30
while !Task.isCancelled {
31
31
if let client = socketClient, client.isConnected {
32
32
let pingMessage = ["type": "ping"]
33
- if let jsonData = try JSONSerialization.data(withJSONObject: pingMessage),
34
- let jsonString = String(data: jsonData, encoding: .utf8) {
33
+ let jsonData = try JSONSerialization.data(withJSONObject: pingMessage)
34
+ if let jsonString = String(data: jsonData, encoding: .utf8) {
35
35
client.send(text: jsonString)
36
36
}
37
37
}
You can’t perform that action at this time.
0 commit comments