We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d31027 commit 8fe95f2Copy full SHA for 8fe95f2
ios/Firestack/FirestackDatabase.m
@@ -481,8 +481,12 @@ - (id) init
481
}];
482
});
483
// Wait for the event handler to call tryCommitTransaction
484
- dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
485
- BOOL abort = [transactionState valueForKey:@"abort"];
+ // WARNING: This wait occurs on the Firebase Worker Queue
+ // so if tryCommitTransaction fails to signal the semaphore
486
+ // no further blocks will be executed by Firebase until the timeout expires
487
+ dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, 30 * NSEC_PER_SEC);
488
+ BOOL timedout = dispatch_semaphore_wait(sema, delayTime) != 0;
489
+ BOOL abort = [transactionState valueForKey:@"abort"] || timedout;
490
id value = [transactionState valueForKey:@"value"];
491
dispatch_barrier_async(_transactionQueue, ^{
492
[_transactions removeObjectForKey:identifier];
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments