1 import { Subscriber } from '../Subscriber';
2 export function retry(count = -1) {
3 return (source) => source.lift(new RetryOperator(count, source));
6 constructor(count, source) {
10 call(subscriber, source) {
11 return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
14 class RetrySubscriber extends Subscriber {
15 constructor(destination, count, source) {
21 if (!this.isStopped) {
22 const { source, count } = this;
24 return super.error(err);
26 else if (count > -1) {
27 this.count = count - 1;
29 source.subscribe(this._unsubscribeAndRecycle());
33 //# sourceMappingURL=retry.js.map