diff --git a/examples/pubsubBenchmark.js b/examples/pubsubBenchmark.js index 34a7eb8..94e2273 100644 --- a/examples/pubsubBenchmark.js +++ b/examples/pubsubBenchmark.js @@ -39,14 +39,12 @@ let run = (async(() => { queriesPerSecond = 0; }, 1000); - setInterval(async(() => { - // while(true) { + while(true) { channel.add(id + totalQueries); totalQueries ++; lastTenSeconds ++; queriesPerSecond ++; - // } - }), 100); + } } catch(e) { console.error("error:", e); diff --git a/src/OrbitClient.js b/src/OrbitClient.js index 6770636..233c119 100644 --- a/src/OrbitClient.js +++ b/src/OrbitClient.js @@ -30,11 +30,7 @@ class OrbitClient { channel(hash, password) { if(password === undefined) password = ''; - await(this._pubsub.subscribe(hash, password, async((hash, message, seq) => { - let m = await(Aggregator._fetchOne(this.ipfs, message, password)); - // console.log(">", m.key, m.seq, m.Payload); - }))); - // await(this._pubsub.subscribe(hash, password)); + await(this._pubsub.subscribe(hash, password)); // this._pubsub.subscribe(hash, password, async((hash, message, seq) => { // let m = Aggregator._fetchOne(this.ipfs, message, password); // console.log(">", message);