mirror of https://github.com/status-im/web3.js.git
prevent web3.reset from removing isSyncing polls
This commit is contained in:
parent
21be9f829b
commit
d70df3626a
|
@ -5846,9 +5846,13 @@ RequestManager.prototype.stopPolling = function (pollId) {
|
|||
*/
|
||||
RequestManager.prototype.reset = function () {
|
||||
for (var key in this.polls) {
|
||||
// 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
|
@ -5846,9 +5846,13 @@ RequestManager.prototype.stopPolling = function (pollId) {
|
|||
*/
|
||||
RequestManager.prototype.reset = function () {
|
||||
for (var key in this.polls) {
|
||||
// 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
File diff suppressed because one or more lines are too long
|
@ -179,9 +179,13 @@ RequestManager.prototype.stopPolling = function (pollId) {
|
|||
*/
|
||||
RequestManager.prototype.reset = function () {
|
||||
for (var key in this.polls) {
|
||||
// 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);
|
||||
|
|
Loading…
Reference in New Issue