mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
Remove setTimeout() when publishing to pubsub
This commit is contained in:
@@ -122,7 +122,7 @@ class OrbitDB {
|
||||
// Callback for local writes to the database. We the update to pubsub.
|
||||
_onWrite (address, entry, heads) {
|
||||
if(!heads) throw new Error("'heads' not defined")
|
||||
if(this._pubsub) setImmediate(() => this._pubsub.publish(address, heads))
|
||||
if(this._pubsub) this._pubsub.publish(address, heads)
|
||||
}
|
||||
|
||||
// Callback for receiving a message from the network
|
||||
|
||||
Reference in New Issue
Block a user