File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -948,9 +948,11 @@ export class Iterable {
948948
949949 if ( Platform . OS === 'android' ) {
950950 //Give enough time for Activity to wake up.
951- setTimeout ( ( ) => {
951+ const timeoutId = setTimeout ( ( ) => {
952952 callUrlHandler ( url , context ) ;
953953 } , 1000 ) ;
954+ // Use unref() to prevent the timeout from keeping the process alive
955+ timeoutId . unref ( ) ;
954956 } else {
955957 callUrlHandler ( url , context ) ;
956958 }
@@ -995,7 +997,7 @@ export class Iterable {
995997 ( promiseResult as IterableAuthResponse ) . authToken
996998 ) ;
997999
998- setTimeout ( ( ) => {
1000+ const timeoutId = setTimeout ( ( ) => {
9991001 if (
10001002 authResponseCallback === IterableAuthResponseResult . SUCCESS
10011003 ) {
@@ -1014,6 +1016,8 @@ export class Iterable {
10141016 ) ;
10151017 }
10161018 } , 1000 ) ;
1019+ // Use unref() to prevent the timeout from keeping the process alive
1020+ timeoutId . unref ( ) ;
10171021 } else if ( typeof promiseResult === typeof '' ) {
10181022 //If promise only returns string
10191023 RNIterableAPI . passAlongAuthToken ( promiseResult as string ) ;
You can’t perform that action at this time.
0 commit comments