made filter polling async

This commit is contained in:
Fabian Vogelsteller 2015-03-02 13:12:57 +01:00
parent 869bb668e8
commit 9c4080bf26
4 changed files with 17 additions and 13 deletions

4
dist/ethereum.js vendored
View File

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

View File

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