@@ -293,7 +293,7 @@ private IObservable<IReadOnlyCollection<FirebaseObject<T>>> GetInitialPullObserv
293
293
}
294
294
295
295
// there is an element root, which indicates the target location is not a collection but a single element
296
- return Observable . Defer ( async ( ) => Observable . Return ( await query . OnceSingleAsync < T > ( ) ) . Select ( e => new [ ] { new FirebaseObject < T > ( this . elementRoot , e ) } ) ) ;
296
+ return Observable . Defer ( async ( ) => Observable . Return ( await query . OnceSingleAsync < T > ( ) . ConfigureAwait ( false ) ) . Select ( e => new [ ] { new FirebaseObject < T > ( this . elementRoot , e ) } ) ) ;
297
297
}
298
298
299
299
private IDisposable InitializeStreamingSubscription ( IObserver < FirebaseEvent < T > > observer )
@@ -336,19 +336,19 @@ private async void SynchronizeThread()
336
336
try
337
337
{
338
338
var validEntries = this . Database . Where ( e => e . Value != null ) ;
339
- await this . PullEntriesAsync ( validEntries . Where ( kvp => kvp . Value . SyncOptions == SyncOptions . Pull ) ) ;
339
+ await PullEntriesAsync ( validEntries . Where ( kvp => kvp . Value . SyncOptions == SyncOptions . Pull ) ) . ConfigureAwait ( false ) ;
340
340
341
341
if ( this . pushChanges )
342
342
{
343
- await this . PushEntriesAsync ( validEntries . Where ( kvp => kvp . Value . SyncOptions == SyncOptions . Put || kvp . Value . SyncOptions == SyncOptions . Patch ) ) ;
343
+ await PushEntriesAsync ( validEntries . Where ( kvp => kvp . Value . SyncOptions == SyncOptions . Put || kvp . Value . SyncOptions == SyncOptions . Patch ) ) . ConfigureAwait ( false ) ;
344
344
}
345
345
}
346
346
catch ( Exception ex )
347
347
{
348
348
this . SyncExceptionThrown ? . Invoke ( this , new ExceptionEventArgs ( ex ) ) ;
349
349
}
350
350
351
- await Task . Delay ( this . childQuery . Client . Options . SyncPeriod ) ;
351
+ await Task . Delay ( childQuery . Client . Options . SyncPeriod ) . ConfigureAwait ( false ) ;
352
352
}
353
353
}
354
354
@@ -377,7 +377,7 @@ private async Task PushEntriesAsync(IEnumerable<KeyValuePair<string, OfflineEntr
377
377
378
378
try
379
379
{
380
- await Task . WhenAll ( tasks ) . WithAggregateException ( ) ;
380
+ await Task . WhenAll ( tasks ) . WithAggregateException ( ) . ConfigureAwait ( false ) ;
381
381
}
382
382
catch ( Exception ex )
383
383
{
@@ -396,7 +396,7 @@ private async Task PullEntriesAsync(IEnumerable<KeyValuePair<string, OfflineEntr
396
396
397
397
try
398
398
{
399
- await Task . WhenAll ( tasks ) . WithAggregateException ( ) ;
399
+ await Task . WhenAll ( tasks ) . WithAggregateException ( ) . ConfigureAwait ( false ) ;
400
400
}
401
401
catch ( Exception ex )
402
402
{
@@ -407,13 +407,13 @@ private async Task PullEntriesAsync(IEnumerable<KeyValuePair<string, OfflineEntr
407
407
408
408
private async Task ResetAfterPull ( Task < T > task , string key , OfflineEntry entry )
409
409
{
410
- await task ;
410
+ await task . ConfigureAwait ( false ) ;
411
411
this . SetAndRaise ( key , new OfflineEntry ( key , task . Result , entry . Priority , SyncOptions . None ) , FirebaseEventSource . OnlinePull ) ;
412
412
}
413
413
414
414
private async Task ResetSyncAfterPush ( Task task , string key , T obj )
415
415
{
416
- await this . ResetSyncAfterPush ( task , key ) ;
416
+ await ResetSyncAfterPush ( task , key ) . ConfigureAwait ( false ) ;
417
417
418
418
if ( this . streamingOptions == StreamingOptions . None )
419
419
{
@@ -423,7 +423,7 @@ private async Task ResetSyncAfterPush(Task task, string key, T obj)
423
423
424
424
private async Task ResetSyncAfterPush ( Task task , string key )
425
425
{
426
- await task ;
426
+ await task . ConfigureAwait ( false ) ;
427
427
this . ResetSyncOptions ( key ) ;
428
428
}
429
429
0 commit comments