I am using Angular app with Rxjs and electron. I am creating subscription using merge
merge(entityUpdated$, timer(1 * 1000, 10))
, where I am downloading updates from BE every 10seconds or when any of the entity is updated. This works perfectly only few minutes, then the requests aren't sent for a minute. If I open devtools in the electron, it looks like the app recognizer that, and everything works fine for another few minutes.
I have also added tap
after the merge
operator and found out that it actually starts emitting exactly minute after each emission (it should emit every 10s).
Do you have any idea why the timer suddendly stops emittion on 10s interval and starts again once I open dev tools?