Skip to content

Commit

Permalink
prevent web3.reset from removing isSyncing polls
Browse files Browse the repository at this point in the history
  • Loading branch information
frozeman committed Sep 10, 2015
1 parent 21be9f8 commit e0bea8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/web3/requestmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,13 @@ RequestManager.prototype.stopPolling = function (pollId) {
*/
RequestManager.prototype.reset = function () {
for (var key in this.polls) {
this.polls[key].uninstall();
// remove all polls, except sync polls,
// they need to be removed manually by calling syncing.stopWatching()
if(key.indexOf('syncPoll_') === -1) {
this.polls[key].uninstall();
delete this.polls[key];
}
}
this.polls = {};

if (this.timeout) {
clearTimeout(this.timeout);
Expand Down

0 comments on commit e0bea8f

Please sign in to comment.