I used retryWhen with the bufferWhen operator in my code. But retryWhen is deprecated. Which operator can I use instead of retryWhen? This is my code:
of(1)
.pipe(
tap(() => {
if (this.webBusy) {
throw 2;
}
}),
retryWhen(errors =>
errors.pipe(
tap(val => console.log(`Nav ${val} WebBusy`)),
bufferWhen(() => this.doNextAct$)
)
),
switchMap((resp: SvcResponse) => {
this.webBusy = true;
return api.doAct(navData);
}),
tap((resp: SvcResponse) => {
this.webBusy = false;
this.doNextAct$.next(1);
}),
).subscribe()
I tried using the delay operator but I'm having trouble combining it with the bufferWhen operator.