hyperswarm
Advanced tools
Comparing version 4.4.1 to 4.5.0
14
index.js
@@ -140,3 +140,3 @@ const { EventEmitter } = require('events') | ||
if (this._handleFirewall(peerInfo.publicKey, null)) { | ||
peerInfo.ban() | ||
peerInfo.ban(true) | ||
this._flushMaybe(peerInfo) | ||
@@ -411,4 +411,4 @@ return | ||
async destroy () { | ||
if (this.destroyed) return | ||
async destroy ({ force } = {}) { | ||
if (this.destroyed && !force) return | ||
this.destroyed = true | ||
@@ -418,3 +418,3 @@ | ||
await this.clear() | ||
if (!force) await this.clear() | ||
@@ -428,7 +428,3 @@ await this.server.close() | ||
for (const conn of this._allConnections) { | ||
conn.destroy() | ||
} | ||
await this.dht.destroy() | ||
await this.dht.destroy({ force }) | ||
} | ||
@@ -435,0 +431,0 @@ |
{ | ||
"name": "hyperswarm", | ||
"version": "4.4.1", | ||
"version": "4.5.0", | ||
"description": "A distributed networking stack for connecting peers", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -160,6 +160,6 @@ # hyperswarm | ||
#### `peerInfo.ban()` | ||
Ban the peer. This will prevent any future reconnection attempts, but it will __not__ close any existing connections. | ||
#### `peerInfo.ban(banStatus = false)` | ||
Ban or unban the peer. Banning will prevent any future reconnection attempts, but it will __not__ close any existing connections. | ||
## 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
34296
746