From c588f232487deb3aeabccc70c848020d4872bc9b Mon Sep 17 00:00:00 2001 From: haad Date: Sat, 5 Mar 2016 12:56:45 +0100 Subject: [PATCH] Fix "Bus error: 10" --- src/OrbitClient.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/OrbitClient.js b/src/OrbitClient.js index 20259d6..4bd9de3 100644 --- a/src/OrbitClient.js +++ b/src/OrbitClient.js @@ -22,10 +22,7 @@ class OrbitClient { if(subscribe === undefined) subscribe = true; this.db.use(channel, this.user, password); - this.db.events.on('data', async((hash) => { - await(this._pubsub.publish(channel, hash)); - this.events.emit('data', channel, hash); - })); + this.db.events.on('data', (hash) => this._pubsub.publish(channel, hash)); if(subscribe) this._pubsub.subscribe(channel, password, async((channel, message) => this.db.sync(channel, message)));