mirror of https://github.com/status-im/web3.js.git
made filter polling async
This commit is contained in:
parent
869bb668e8
commit
9c4080bf26
|
@ -1559,12 +1559,14 @@ var requestManager = function() {
|
|||
|
||||
var poll = function () {
|
||||
polls.forEach(function (data) {
|
||||
var result = send(data.data);
|
||||
// send async
|
||||
send(data.data, function(result){
|
||||
if (!(result instanceof Array) || result.length === 0) {
|
||||
return;
|
||||
}
|
||||
data.callback(result);
|
||||
});
|
||||
});
|
||||
setTimeout(poll, c.ETH_POLLING_TIMEOUT);
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -112,12 +112,14 @@ var requestManager = function() {
|
|||
|
||||
var poll = function () {
|
||||
polls.forEach(function (data) {
|
||||
var result = send(data.data);
|
||||
// send async
|
||||
send(data.data, function(result){
|
||||
if (!(result instanceof Array) || result.length === 0) {
|
||||
return;
|
||||
}
|
||||
data.callback(result);
|
||||
});
|
||||
});
|
||||
setTimeout(poll, c.ETH_POLLING_TIMEOUT);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue