mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-05-22 14:56:38 +00:00
Fix "Bus error: 10"
This commit is contained in:
parent
9e00aab161
commit
c588f23248
@ -22,10 +22,7 @@ class OrbitClient {
|
|||||||
if(subscribe === undefined) subscribe = true;
|
if(subscribe === undefined) subscribe = true;
|
||||||
|
|
||||||
this.db.use(channel, this.user, password);
|
this.db.use(channel, this.user, password);
|
||||||
this.db.events.on('data', async((hash) => {
|
this.db.events.on('data', (hash) => this._pubsub.publish(channel, hash));
|
||||||
await(this._pubsub.publish(channel, hash));
|
|
||||||
this.events.emit('data', channel, hash);
|
|
||||||
}));
|
|
||||||
|
|
||||||
if(subscribe)
|
if(subscribe)
|
||||||
this._pubsub.subscribe(channel, password, async((channel, message) => this.db.sync(channel, message)));
|
this._pubsub.subscribe(channel, password, async((channel, message) => this.db.sync(channel, message)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user