-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
yeah, this is weird: https://travis-ci.org/ipfs/js-ipfs/jobs/128359184#L2133-L2136 |
@dignifiedquire you might want to take a look. This was introduced with the update on libp2p-swarm: libp2p/js-libp2p-switch@85a0647 Probably the problem was always there, but now it is really easy to see |
|
I take that back, I started hard reseting commits again one at a time and the commit before this one threw the spdy error as well. |
@nginnever wanna check with libp2p-swarm 0.12.5 ? |
Downloaded the archived libp2p-swarm v0.12.5 and npm linked it to the js-ipfs repos, seems to fix the issue. |
Changed libp2p-swarm to throw transport close errors
and received
In js-ipfs libp2p core swarm.close |
5a5b064
to
8b70d9d
Compare
@@ -27,7 +26,8 @@ function IPFS (repoInstance) { | |||
throw new Error('Must be instantiated with new') | |||
} | |||
|
|||
if (!(repoInstance instanceof IPFSRepo)) { | |||
if (typeof repoInstance === 'string' || | |||
repoInstance === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that on Travis, the "isDaemonOn" always yielded true
, making the 'cli offline' tests work online. Checking if this was the issue.
Good best practice, never do instanceof for 'types' outside the scope of the module, cause different versions will have different signatures and you never know which version will be thrown at the func.
@nginnever @dignifiedquire
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it fixed the 'weird fails' on the block tests : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put these changes into the files PR.
Hopefully, this will give us a better answer spdy-http2/spdy-transport#26 (probably the right answer is the one that is most simply, we need to check for |
GREEN :D |
Created this PR to make travis run again on clean master to check the errors that @nginnever mentioned