mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-07-09 22:01:34 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
8d2d8c98a0 | |||
30bf5bb161 | |||
c88eaf416c |
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,3 +1,13 @@
|
|||||||
|
<a name="0.14.1"></a>
|
||||||
|
## [0.14.1](https://github.com/libp2p/js-libp2p/compare/v0.14.0...v0.14.1) (2017-12-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* prevent "The libp2p node is not started yet" when stopping ([#138](https://github.com/libp2p/js-libp2p/issues/138)) ([c88eaf4](https://github.com/libp2p/js-libp2p/commit/c88eaf4))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="0.14.0"></a>
|
<a name="0.14.0"></a>
|
||||||
# [0.14.0](https://github.com/libp2p/js-libp2p/compare/v0.13.3...v0.14.0) (2017-12-14)
|
# [0.14.0](https://github.com/libp2p/js-libp2p/compare/v0.13.3...v0.14.0) (2017-12-14)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "libp2p",
|
"name": "libp2p",
|
||||||
"version": "0.14.0",
|
"version": "0.14.1",
|
||||||
"description": "JavaScript base class for libp2p bundles",
|
"description": "JavaScript base class for libp2p bundles",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -224,8 +224,6 @@ class Node extends EventEmitter {
|
|||||||
* Stop the libp2p node by closing its listeners and open connections
|
* Stop the libp2p node by closing its listeners and open connections
|
||||||
*/
|
*/
|
||||||
stop (callback) {
|
stop (callback) {
|
||||||
this._isStarted = false
|
|
||||||
|
|
||||||
if (this.modules.discovery) {
|
if (this.modules.discovery) {
|
||||||
this.modules.discovery.forEach((discovery) => {
|
this.modules.discovery.forEach((discovery) => {
|
||||||
setImmediate(() => discovery.stop(() => {}))
|
setImmediate(() => discovery.stop(() => {}))
|
||||||
@ -244,7 +242,10 @@ class Node extends EventEmitter {
|
|||||||
this.emit('stop')
|
this.emit('stop')
|
||||||
cb()
|
cb()
|
||||||
}
|
}
|
||||||
], callback)
|
], (err) => {
|
||||||
|
this._isStarted = false
|
||||||
|
callback(err)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
isStarted () {
|
isStarted () {
|
||||||
|
Reference in New Issue
Block a user