libp2p-tcp
Advanced tools
Comparing version 0.9.4 to 0.10.0
{ | ||
"name": "libp2p-tcp", | ||
"version": "0.9.4", | ||
"version": "0.10.0", | ||
"description": "Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection and interface-transport interfaces", | ||
@@ -36,3 +36,3 @@ "main": "src/index.js", | ||
"devDependencies": { | ||
"aegir": "^11.0.0", | ||
"aegir": "^11.0.1", | ||
"chai": "^3.5.0", | ||
@@ -50,4 +50,5 @@ "dirty-chai": "^1.2.2", | ||
"lodash.isfunction": "^3.0.8", | ||
"mafmt": "^2.1.6", | ||
"multiaddr": "^2.2.2", | ||
"mafmt": "^2.1.7", | ||
"multiaddr": "^2.2.3", | ||
"once": "^1.4.0", | ||
"stream-to-pull-stream": "^1.7.2" | ||
@@ -54,0 +55,0 @@ }, |
@@ -9,2 +9,3 @@ 'use strict' | ||
const Connection = require('interface-connection').Connection | ||
const once = require('once') | ||
const debug = require('debug') | ||
@@ -26,7 +27,7 @@ const log = debug('libp2p:tcp:dial') | ||
cb = once(cb) | ||
const cOpts = ma.toOptions() | ||
log('Connecting to %s %s', cOpts.port, cOpts.host) | ||
const rawSocket = net.connect(cOpts, cb) | ||
const rawSocket = net.connect(cOpts) | ||
rawSocket.once('timeout', () => { | ||
@@ -37,2 +38,9 @@ log('timeout') | ||
rawSocket.once('error', cb) | ||
rawSocket.once('connect', () => { | ||
rawSocket.removeListener('error', cb) | ||
cb() | ||
}) | ||
const socket = toPull.duplex(rawSocket) | ||
@@ -39,0 +47,0 @@ |
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
15463
199
8
+ Addedonce@^1.4.0
+ Addedonce@1.4.0(transitive)
+ Addedwrappy@1.0.2(transitive)
Updatedmafmt@^2.1.7
Updatedmultiaddr@^2.2.3