Skip to content

Commit

Permalink
Merge 401d6d6 into c9482d7
Browse files Browse the repository at this point in the history
  • Loading branch information
nivida committed Nov 28, 2019
2 parents c9482d7 + 401d6d6 commit 7bd84b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,5 @@ Released with 1.0.0-beta.37 code base.
- ``eth-lib`` dependency updated (0.2.7 => 0.2.8) (#3242)

### Fixed

- ``clearSubscriptions`` does no longer throw an error if no running subscriptions do exist (#3246)
12 changes: 7 additions & 5 deletions packages/web3-core-requestmanager/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,13 @@ RequestManager.prototype.clearSubscriptions = function (keepIsSyncing) {
var _this = this;


// uninstall all subscriptions
Object.keys(this.subscriptions).forEach(function(id){
if(!keepIsSyncing || _this.subscriptions[id].name !== 'syncing')
_this.removeSubscription(id);
});
if (this.subscriptions) {
// uninstall all subscriptions
Object.keys(this.subscriptions).forEach(function(id){
if(!keepIsSyncing || _this.subscriptions[id].name !== 'syncing')
_this.removeSubscription(id);
});
}


// reset notification callbacks etc.
Expand Down

0 comments on commit 7bd84b1

Please sign in to comment.