Commit 91d0f22b authored by Fabien's avatar Fabien Committed by GitHub

Merge pull request #155 from steemit/remove-waitForSlot

disable waitForSlot
parents 59b6fe03 bded8827
{
"name": "steem",
"version": "0.5.11",
"version": "0.5.12",
"description": "Steem.js the JavaScript API for Steem blockchain",
"main": "index.js",
"scripts": {
......
......@@ -169,21 +169,21 @@ class Steem extends EventEmitter {
return Promise.props(this.apiIdsP);
}
waitForSlot() {
if (this.inFlight < 10) {
debugEmitters('Less than 10 in-flight messages, moving on');
return null;
}
debugEmitters('More than 10 in-flight messages, waiting');
return Promise.delay(100).then(() => {
if (this.inFlight < 10) {
debugEmitters('Less than 10 in-flight messages, moving on');
return null;
}
return this.waitForSlot();
});
}
// waitForSlot() {
// if (this.inFlight < 10) {
// debugEmitters('Less than 10 in-flight messages, moving on');
// return null;
// }
//
// debugEmitters('More than 10 in-flight messages, waiting');
// return Promise.delay(100).then(() => {
// if (this.inFlight < 10) {
// debugEmitters('Less than 10 in-flight messages, moving on');
// return null;
// }
// return this.waitForSlot();
// });
// }
send(api, data, callback) {
debugSetup('Steem::send', api, data);
......@@ -200,7 +200,7 @@ class Steem extends EventEmitter {
debugApiIds('Going to wait for setup messages to resolve');
}
this.currentP = Promise.join(startP, apiIdsP, this.waitForSlot())
this.currentP = Promise.join(startP, apiIdsP)
.then(() => new Promise((resolve, reject) => {
if (!this.ws) {
reject(new Error(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment