prevent web3.reset from removing isSyncing polls

This commit is contained in:
Fabian Vogelsteller 2015-09-10 11:57:21 +02:00
parent 21be9f829b
commit e0bea8f0b3
1 changed files with 6 additions and 2 deletions

View File

@ -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);