Skip to content

Commit

Permalink
fix: set semaphore as nil after complete de function
Browse files Browse the repository at this point in the history
  • Loading branch information
kele-leanes committed Jan 5, 2024
1 parent 66cc38c commit 409a49f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/XMTPModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,14 @@ public class XMTPModule: Module {
Function("preEnableIdentityCallbackCompleted") {
DispatchQueue.global().async {
self.preEnableIdentityCallbackDeferred?.signal()
self.preEnableIdentityCallbackDeferred = nil
}
}

Function("preCreateIdentityCallbackCompleted") {
DispatchQueue.global().async {
self.preCreateIdentityCallbackDeferred?.signal()
self.preCreateIdentityCallbackDeferred = nil
}
}
}
Expand Down Expand Up @@ -724,12 +726,10 @@ public class XMTPModule: Module {
func preEnableIdentityCallback() {
sendEvent("preEnableIdentityCallback")
self.preEnableIdentityCallbackDeferred?.wait()
self.preCreateIdentityCallbackDeferred = nil
}

func preCreateIdentityCallback() {
sendEvent("preCreateIdentityCallback")
self.preCreateIdentityCallbackDeferred?.wait()
self.preEnableIdentityCallbackDeferred = nil
}
}

0 comments on commit 409a49f

Please sign in to comment.