resource1$ = hash1$.map( (renew: boolean) => renew ? http1$ : Observable.empty() );
resource2$ = hash2$.map( (renew: boolean) => renew ? http2$ : Observable.empty() );
sync$ = Observable.forkJoin(resource1$, resource2$);
sync$.subscribe( () => console.log('Sync done!), (err) => console.log('Sync failed!') );
Hello there, Upon beginning my application, I have several resources that need to be synchronized from an API. My goal is to sync them concurrently and check if synchronization is needed by sending a HEAD request first and comparing the X-HASH header with previously stored data.
For instance, hash1$ performs a HEAD request, compares hashes, and returns true or false accordingly.
I'm encountering an issue where if resource1$ returns Observable.empty, all streams in sync$ are canceled... however, I am still unsure why this behavior occurs.