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 d70df3626a
6 changed files with 139 additions and 12 deletions

8
dist/web3-light.js vendored
View File

@ -5846,9 +5846,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);

File diff suppressed because one or more lines are too long

8
dist/web3.js vendored
View File

@ -5846,9 +5846,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);

117
dist/web3.js.map vendored Normal file

File diff suppressed because one or more lines are too long

5
dist/web3.min.js vendored

File diff suppressed because one or more lines are too long

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