Skip to content

Commit

Permalink
update libp2p, which packs all the changes made to get async identify
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Jun 27, 2016
1 parent 916ad9b commit d8af2ce
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .aegir.js
Expand Up @@ -11,6 +11,9 @@ module.exports = {
'../vendor/forge.bundle.js'
)
}
},
externals: {
'simple-websocket-server': '{}'
}
}
}
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -40,7 +40,7 @@
"fs-blob-store": "^5.2.1",
"idb-plus-blob-store": "^1.1.2",
"ipfs-repo": "^0.8.0",
"libp2p-ipfs": "^0.11.0",
"libp2p-ipfs": "^0.12.0",
"lodash": "^4.13.1",
"multiaddr": "^2.0.2",
"ncp": "^2.0.0",
Expand All @@ -67,4 +67,4 @@
"David Dias <daviddias.p@gmail.com>",
"dignifiedquire <dignifiedquire@gmail.com>"
]
}
}
7 changes: 6 additions & 1 deletion src/network/index.js
Expand Up @@ -62,7 +62,12 @@ module.exports = class Network {
} catch (err) {
return this.bitswap._receiveError(err)
}
this.bitswap._receiveMessage(conn.peerId, msg)
conn.getPeerInfo((err, peerInfo) => {
if (err) {
return this.bitswap._receiveError(err)
}
this.bitswap._receiveMessage(peerInfo.id, msg)
})
}))

conn.on('error', (err) => {
Expand Down

0 comments on commit d8af2ce

Please sign in to comment.