Description
Bug Report
Current Behavior
Passing a large period
to interval(period: number, scheduler: Scheduler): Observable
results in continuous emissions instead of 1 after given period
passed.
Reproduction
Sadly I can't provide a StackBlitz due to corporate firewall issues, but I managed to reproduce the problem here using rxjs-playground.github.io.
I'm posting the same code here:
var largePeriod = 2240240746; // roughly 26 days in milliseconds
Rx.Observable.interval(largePeriod).subscribe(val => console.log(val))
Expected behavior
The Observable
should not emit until given period
has passed.
Environment
- Windows 10
- Runtime: Node 8.9.4, Chrome 71.0.3578.98
- RxJS version: 6.2.2
Additional info
I know that the such a large period is very awkward. I'm getting such a large value from a backend system telling me that the time-window for a given operation expires at some point in the future.
As a workaround I can pass to interval min(backendValue, largestPeriodNotExposingThisBug)
, but I believe it is right to inform you about this to prevent more problematic issues.