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

Already piped error #244

Closed
ajayrao80 opened this issue Sep 10, 2018 · 4 comments
Closed

Already piped error #244

ajayrao80 opened this issue Sep 10, 2018 · 4 comments

Comments

@ajayrao80
Copy link

Type: Bug
Severity: Low

Description: Occasionally I get already piped error. I have no idea what it is and why it occurs. I thought it has something to do with dialing and tried catching it but I failed.
Can anyone please explain what it is and how to get around it

@jacobheun
Copy link
Contributor

@ajayrao80 do you have a stacktrace of the error? Also, what version of multistream-select do you have locally?

@ajayrao80
Copy link
Author

ajayrao80 commented Sep 10, 2018

multistream-select version: 0.14.2

Here's the stack trace:

already piped
    at sink (F:\classwork\madnet\node_modules\pull-pair\index.js:11)
    at consume (F:\classwork\madnet\node_modules\pull-defer\sink.js:7)
    at consume (F:\classwork\madnet\node_modules\pull-defer\sink.js:7)
    at Connection.consume (F:\classwork\madnet\node_modules\pull-defer\sink.js:7)
    at pull (F:\classwork\madnet\node_modules\pull-stream\pull.js:43)
    at Dialer.handle (F:\classwork\madnet\node_modules\multistream-select\src\dialer\index.js:47)
    at handleSafe (F:\classwork\madnet\node_modules\libp2p-switch\src\dial.js:51)
    at Dialer._performProtocolHandshake (F:\classwork\madnet\node_modules\libp2p-switch\src\dial.js:445)
    at waterfall (F:\classwork\madnet\node_modules\libp2p-switch\src\dial.js:157)
    at nextTask (F:\classwork\madnet\node_modules\async\waterfall.js:16)

Also, I know why it's happening. Once the node connects with another node, and if one of them goes offline, and when they come back they try to connect again. But because they were connected before it throws an error. Is there any way to handle that? I tried putting the entire dial thing on try catch block, it didn't work.

@jacobheun
Copy link
Contributor

[email protected] should catch this error. Can you try updating your package lock? I'm working on a release for libp2p-switch to upgrade to 0.14.3 explicitly.

That is good to know! I'm also currently working on making libp2p-switch a full state machine, I will see if I can include a root resolution for this issue there. In the mean time [email protected] should catch the throw.

@ajayrao80
Copy link
Author

Thanks! That worked!!

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

No branches or pull requests

2 participants