chore: release version v0.4.1

This commit is contained in:
David Dias 2016-04-25 02:21:32 +01:00
parent 37798ee8ea
commit 4d528ba16d
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "libp2p-websockets", "name": "libp2p-websockets",
"version": "0.4.0", "version": "0.4.1",
"description": "JavaScript implementation of the WebSockets module that libp2p uses and that implements the interface-transport spec", "description": "JavaScript implementation of the WebSockets module that libp2p uses and that implements the interface-transport spec",
"main": "lib/index.js", "main": "lib/index.js",
"jsnext:main": "src/index.js", "jsnext:main": "src/index.js",

View File

@ -1,7 +1,7 @@
'use strict' 'use strict'
// const debug = require('debug') const debug = require('debug')
// const log = debug('libp2p:tcp') const log = debug('libp2p:websockets')
const SWS = require('simple-websocket') const SWS = require('simple-websocket')
const mafmt = require('mafmt') const mafmt = require('mafmt')
@ -61,7 +61,8 @@ function WebSockets () {
this.close = (callback) => { this.close = (callback) => {
if (listeners.length === 0) { if (listeners.length === 0) {
callback(new Error('there are no listeners')) log('Called close with no active listeners')
return callback()
} }
var count = 0 var count = 0
listeners.forEach((listener) => { listeners.forEach((listener) => {