Comparing version 0.2.3 to 0.2.4
@@ -5,2 +5,3 @@ export declare class ConnScheduler { | ||
private readonly hub; | ||
private readonly hasSsbDb; | ||
private closed; | ||
@@ -7,0 +8,0 @@ private lastMessageAt; |
@@ -104,2 +104,3 @@ "use strict"; | ||
this.hub = this.ssb.conn.internalConnHub(); | ||
this.hasSsbDb = !!this.ssb.post && !!this.ssb.messagesByType; | ||
this.closed = true; | ||
@@ -109,3 +110,3 @@ this.lastMessageAt = 0; | ||
this.hops = {}; | ||
if (this.ssb.post) { | ||
if (this.hasSsbDb) { | ||
this.ssb.post((msg) => { | ||
@@ -167,4 +168,6 @@ if (msg.value.author != this.ssb.id) { | ||
updateConnectionsNow() { | ||
if (!this.ssb.ready() || this.isCurrentlyDownloading()) | ||
if (this.hasSsbDb && !this.ssb.ready()) | ||
return; | ||
if (this.isCurrentlyDownloading()) | ||
return; | ||
if (this.conf('seed', true)) { | ||
@@ -263,2 +266,6 @@ this.updateTheseConnections(p => p[1].source === 'seed', { | ||
setupPubDiscovery() { | ||
if (!this.hasSsbDb) { | ||
debug('Warning: ssb-db is missing, scheduling will miss some info'); | ||
return; | ||
} | ||
if (!this.config.gossip || | ||
@@ -265,0 +272,0 @@ (this.config.gossip.autoPopulate !== false && |
{ | ||
"name": "ssb-conn", | ||
"description": "SSB plugin for establishing and managing peer connections", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"homepage": "https://github.com/staltz/ssb-conn", | ||
@@ -52,2 +52,2 @@ "main": "lib/index.js", | ||
"license": "MIT" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123359
2160