Skip to content

Commit

Permalink
Fix timer
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Sep 29, 2020
1 parent c497979 commit 0817e5e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function createObservableMonitor<T, E>(
return new Observable((subscriber) => {
const subscription: Subscription = interval(heartbeatInterval)
.pipe(
startWith(0),
startWith(timer(0, heartbeatInterval)),
// switch from the heartbeat interval to the instantiated observable until it completes / errors
exhaustMap(() => takeUntilDurationOfInactivity(observableFactory(), inactivityTimeout)),
// if an error is thrown, catch it, notify and try to recover
Expand Down

0 comments on commit 0817e5e

Please sign in to comment.