Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: make ipfs.ping() options optional #1627

Merged
merged 1 commit into from
Oct 16, 2018
Merged

Conversation

achingbrain
Copy link
Member

Without this PR:

$ npm test

...*snip*

     Uncaught TypeError: Cannot read property 'push' of null
      at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/collect.js:7:9
      at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/reduce.js:8:11
      at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/drain.js:24:37
      at callback (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-pushable/index.js:84:5)
      at Function.push (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-pushable/index.js:44:7)
      at libp2pNode.ping (src/core/components/ping-pull-stream.js:79:18)
      at _getPeerInfo (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/libp2p/src/index.js:339:7)
      at setImmediate (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/libp2p/src/get-peer-info.js:54:24)
      at Immediate.<anonymous> (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/async/internal/setImmediate.js:27:16)

Looks like the same as the second error stack trace posted in #1616

Without this PR:

```console
$ npm test

...*snip*

     Uncaught TypeError: Cannot read property 'push' of null
      at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/collect.js:7:9
      at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/reduce.js:8:11
      at /Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-stream/sinks/drain.js:24:37
      at callback (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-pushable/index.js:84:5)
      at Function.push (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/pull-pushable/index.js:44:7)
      at libp2pNode.ping (src/core/components/ping-pull-stream.js:79:18)
      at _getPeerInfo (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/libp2p/src/index.js:339:7)
      at setImmediate (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/libp2p/src/get-peer-info.js:54:24)
      at Immediate.<anonymous> (/Users/alex/Documents/Workspaces/ipfs/js-ipfs/node_modules/async/internal/setImmediate.js:27:16)
```

Might resolve the second issue in #1616
@ghost ghost assigned achingbrain Oct 9, 2018
@ghost ghost added the status/in-progress In progress label Oct 9, 2018
@alanshaw alanshaw merged commit 08f06b6 into master Oct 16, 2018
@alanshaw alanshaw deleted the make-ping-options-optional branch October 16, 2018 07:39
@ghost ghost removed the status/in-progress In progress label Oct 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants