Compare commits

..

8 Commits

Author SHA1 Message Date
David Dias
59de0da19c chore: release version v0.14.3 2017-12-15 08:25:08 +00:00
David Dias
0caf600c9a chore: update contributors 2017-12-15 08:25:08 +00:00
David Dias
a4943b4509 chore: update npm ignore 2017-12-15 08:24:49 +00:00
David Dias
c128873a07 chore: release version v0.14.2 2017-12-15 07:15:05 +00:00
David Dias
5e2b6df04a chore: update contributors 2017-12-15 07:15:05 +00:00
David Dias
8d2d8c98a0 chore: release version v0.14.1 2017-12-15 07:10:42 +00:00
David Dias
30bf5bb161 chore: update contributors 2017-12-15 07:10:42 +00:00
Pedro Teixeira
c88eaf416c fix: prevent "The libp2p node is not started yet" when stopping (#138) 2017-12-15 07:08:44 +00:00
4 changed files with 38 additions and 11 deletions

View File

@@ -1,7 +1,13 @@
**/node_modules/
**/*.log
test/repo-tests*
# Logs # Logs
logs logs
*.log *.log
coverage
# Runtime data # Runtime data
pids pids
*.pid *.pid
@@ -16,13 +22,13 @@ coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt .grunt
# Compiled binary addons (http://nodejs.org/api/addons.html) # node-waf configuration
build/Release .lock-wscript
# Optional npm cache directory build
.npm
# Optional REPL history # Dependency directory
.node_repl_history # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
test test

View File

@@ -1,3 +1,23 @@
<a name="0.14.3"></a>
## [0.14.3](https://github.com/libp2p/js-libp2p/compare/v0.14.2...v0.14.3) (2017-12-15)
<a name="0.14.2"></a>
## [0.14.2](https://github.com/libp2p/js-libp2p/compare/v0.14.1...v0.14.2) (2017-12-15)
<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)

View File

@@ -1,6 +1,6 @@
{ {
"name": "libp2p", "name": "libp2p",
"version": "0.14.0", "version": "0.14.3",
"description": "JavaScript base class for libp2p bundles", "description": "JavaScript base class for libp2p bundles",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {

View File

@@ -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 () {