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 d70df36
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 12 deletions.
8 changes: 6 additions & 2 deletions dist/web3-light.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions dist/web3-light.min.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions dist/web3.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 117 additions & 0 deletions dist/web3.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions dist/web3.min.js

Large diffs are not rendered by default.

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 d70df36

Please sign in to comment.