Skip to content

Commit

Permalink
Merge pull request libp2p#71 from diasdavid/fix/lost-getObservedAddrs…
Browse files Browse the repository at this point in the history
…-call

if there more than a multiaddr option, we would lose the ability to call getObservedAddrs
  • Loading branch information
daviddias committed May 29, 2016
2 parents d10166c + 4eed270 commit 8341249
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module.exports = function (swarm) {
function next (multiaddr) {
const conn = t.dial(multiaddr, {ready: () => {
pt.wrapStream(conn)
pt.getObservedAddrs = conn.getObservedAddrs.bind(conn)
const cb = callback
callback = noop // this is done to avoid connection drops as connect errors
cb(null, pt)
Expand Down

0 comments on commit 8341249

Please sign in to comment.