Don't unsubscribe on Blockstream errors
This commit is contained in:
@@ -74,7 +74,7 @@ export class EventWatcher {
|
||||
this._blockAndLogStreamIntervalIfExists = intervalUtils.setAsyncExcludingInterval(
|
||||
this._reconcileBlockAsync.bind(this),
|
||||
this._pollingIntervalMs,
|
||||
this._onReconcileBlockError.bind(this, callback),
|
||||
EventWatcher._onBlockAndLogStreamerError.bind(this, callback),
|
||||
);
|
||||
let isRemoved = false;
|
||||
this._onLogAddedSubscriptionToken = this._blockAndLogStreamerIfExists.subscribeToOnLogAdded(
|
||||
@@ -85,10 +85,6 @@ export class EventWatcher {
|
||||
this._onLogStateChangedAsync.bind(this, callback, isRemoved),
|
||||
);
|
||||
}
|
||||
private _onReconcileBlockError(callback: EventWatcherCallback, err: Error): void {
|
||||
this.unsubscribe();
|
||||
callback(err);
|
||||
}
|
||||
private async _onLogStateChangedAsync(
|
||||
callback: EventWatcherCallback,
|
||||
isRemoved: boolean,
|
||||
|
@@ -233,7 +233,6 @@ export class OrderWatcher {
|
||||
if (!_.isNull(err)) {
|
||||
if (!_.isUndefined(this._callbackIfExists)) {
|
||||
this._callbackIfExists(err);
|
||||
this.unsubscribe();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user