File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -514,14 +514,19 @@ extension ReactIterableAPI: IterableAuthDelegate {
514514 func onAuthTokenRequested( completion: @escaping AuthTokenRetrievalHandler ) {
515515 ITBInfo ( )
516516
517- sendEvent ( withName: EventName . handleAuthCalled. rawValue,
518- body: nil )
519-
520- let authTokenRetrievalResult = authHandlerSemaphore. wait ( timeout: . now( ) + 30.0 )
521-
522- if authTokenRetrievalResult == . success {
523- ITBInfo ( " authTokenRetrieval successful " )
524- completion ( passedAuthToken)
517+ DispatchQueue . global ( qos: . userInitiated) . async {
518+ self . sendEvent ( withName: EventName . handleAuthCalled. rawValue,
519+ body: nil )
520+
521+ let authTokenRetrievalResult = self . authHandlerSemaphore. wait ( timeout: . now( ) + 30.0 )
522+
523+ if authTokenRetrievalResult == . success {
524+ ITBInfo ( " authTokenRetrieval successful " )
525+
526+ DispatchQueue . main. async {
527+ completion ( self . passedAuthToken)
528+ }
529+ }
525530 }
526531 }
527532}
You can’t perform that action at this time.
0 commit comments