mirror of
https://github.com/fluencelabs/js-libp2p-websockets
synced 2025-05-12 23:07:19 +00:00
chore: release version v0.4.1
This commit is contained in:
parent
37798ee8ea
commit
4d528ba16d
@ -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",
|
||||||
|
@ -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) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user