Compare commits

..

3 Commits

Author SHA1 Message Date
d2f91814b6 chore: release version v0.7.2 2016-06-23 08:42:03 +01:00
405f552c77 chore: update contributors 2016-06-23 08:42:02 +01:00
cba4b8b94a pass the err on the callback too 2016-06-23 08:41:54 +01:00
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "libp2p-tcp", "name": "libp2p-tcp",
"version": "0.7.1", "version": "0.7.2",
"description": "Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection and interface-transport interfaces", "description": "Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection and interface-transport interfaces",
"main": "lib/index.js", "main": "lib/index.js",
"jsnext:main": "src/index.js", "jsnext:main": "src/index.js",

View File

@ -38,6 +38,10 @@ function TCP () {
conn.emit('timeout') conn.emit('timeout')
}) })
socket.once('error', (err) => {
callback(err)
})
socket.on('connect', () => { socket.on('connect', () => {
callback(null, conn) callback(null, conn)
conn.emit('connect') conn.emit('connect')