Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make spec compliant #26

Merged
merged 6 commits into from
May 4, 2018
Merged

make spec compliant #26

merged 6 commits into from
May 4, 2018

Conversation

Stebalien
Copy link
Member

See: libp2p/mplex#3

(massive thanks to @dyajov for finding this)

See: libp2p/mplex#3

(massive thanks to @dyajov for finding this)
@dryajov
Copy link
Member

dryajov commented Apr 23, 2018

getting and error trying to run the interop test:

screen shot 2018-04-23 at 12 47 47 pm

@Stebalien
Copy link
Member Author

Hm. I can't reproduce. Here's my package-lock.json: /ipfs/QmayQwaBCXygmEdiRkqUbd5K9NXrDFxjm6vWd4oybvew1R

Are you using your changed version or the current one on npm? Also, check git status uncommitted changes.

@dryajov
Copy link
Member

dryajov commented May 4, 2018

So I was able to figure out my env issue and everything runs now. One small thing I ran into with the interop tests, the toPull needs to be toPull.duplex(stream) for duplex streams - it works now, because internally libp2p-mplex will convert it back to a node stream, but broke with the new pull-mplex implementation.

diff --git a/interop/js/server.js b/interop/js/server.js
index f69a770..38e36f9 100644
--- a/interop/js/server.js
+++ b/interop/js/server.js
@@ -31,7 +31,7 @@ function readWrite (stream) {
 }

 const listener = tcp.createServer((socket) => {
-  let muxer = mplex.listener(toPull(socket))
+  let muxer = mplex.listener(toPull.duplex(socket))
   muxer.on('stream', (stream) => {
     readWrite(stream)
   })

@Stebalien Stebalien merged commit 5df09a1 into master May 4, 2018
@ghost ghost removed the status/in-progress In progress label May 4, 2018
@Stebalien Stebalien deleted the fix/compliant branch May 4, 2018 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants