Skip to content

Commit e278eb2

Browse files
committed
fix: invocation
1 parent c88c9a9 commit e278eb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/swift/Sources/Services/Realtime.swift.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ extension Realtime: WebSocketClientDelegate {
223223
stopHeartbeat()
224224

225225
if (!reconnect) {
226-
onCloseCallback?()
226+
onCloseCallbacks.forEach { $0() }
227227
reconnect = true
228228
return
229229
}
@@ -243,7 +243,7 @@ extension Realtime: WebSocketClientDelegate {
243243
stopHeartbeat()
244244
print(error?.localizedDescription ?? "Unknown error")
245245

246-
onErrorCallback?(error, status)
246+
onErrorCallbacks.forEach { $0(error, status) }
247247
}
248248

249249
func handleResponseError(from json: [String: Any]) throws {

0 commit comments

Comments
 (0)