libp2p/js-libp2p-mplex

ungraceful socket disconnection

pgte opened this issue · 0 comments

pgte commented

Using js-ipfs, when I disconnect the network this happens:

index.js:483 Uncaught Error: underlying socket has been closed
    at index.js:483
    at Array.forEach (<anonymous>)
    at Multiplex.destroy (index.js:480)
    at index.js:43
    at call (index.js:50)
    at Array.forEach (<anonymous>)
    at index.js:70
    at f (once.js:17)
    at Stream.<anonymous> (index.js:29)
    at Stream.f (once.js:25)

Once a socket gets closed, dignifiedquire/multiplex propagates an error to the underlying connections here.

Somewhere in the IPFS stack there seams to be a place where a channel is getting created, but the error event is not being handled.