discovery-swarm
Advanced tools
Comparing version 6.0.1 to 6.1.0
@@ -51,2 +51,3 @@ var discovery = require('discovery-channel') | ||
this._listening = false | ||
this._keepExistingConnections = (opts.keepExistingConnections === true) | ||
@@ -420,2 +421,8 @@ this._peersIds = {} | ||
if (old && self._keepExistingConnections) { | ||
self.emit('redundant-connection', connection, info) | ||
connection.destroy() | ||
return | ||
} | ||
if (old) { | ||
@@ -422,0 +429,0 @@ debug('duplicate connections detected in handshake, dropping one') |
{ | ||
"name": "discovery-swarm", | ||
"version": "6.0.1", | ||
"version": "6.1.0", | ||
"description": "A network swarm that uses discovery-channel to find peers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -41,3 +41,4 @@ # discovery-swarm | ||
maxConnections: 0, // max number of connections. | ||
whitelist: [] // array of ip addresses to restrict connections to | ||
whitelist: [], // array of ip addresses to restrict connections to | ||
keepExistingConnections: false // by default, prefer tcp by dropping old utp connections | ||
} | ||
@@ -44,0 +45,0 @@ ``` |
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
29271
700
163