Skip to content

Commit 7a0ab23

Browse files
authored
Merge pull request #1226 from appwrite/update-onclose-callback
2 parents 997e27a + 52bc09a commit 7a0ab23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,10 @@ extension Realtime: WebSocketClientDelegate {
221221

222222
public func onClose(channel: Channel, data: Data) async throws {
223223
stopHeartbeat()
224+
225+
onCloseCallbacks.forEach { $0() }
224226

225227
if (!reconnect) {
226-
onCloseCallbacks.forEach { $0() }
227228
reconnect = true
228229
return
229230
}

0 commit comments

Comments
 (0)