Today, if there is a error in a stream or any other error within the daemon or the gateway, the entire process crashes. While not a problem for testing, it's a problem when deploying and trying to run a long-term daemon (for example, for the js-ipfs daemons).
I raised this before in #1243
Basically, we should be able to gracefully handle errors down the stack without having the daemon and gateway crash.
Current issue is the following error that happens every ~10 minutes:
/usr/src/app/node_modules/pull-pair/index.js:11
throw new Error('already piped')
^
Error: already piped
at sink (/usr/src/app/node_modules/pull-pair/index.js:11:13)
at consume (/usr/src/app/node_modules/pull-defer/sink.js:7:17)
at consume (/usr/src/app/node_modules/pull-defer/sink.js:7:17)
at Connection.consume (/usr/src/app/node_modules/pull-defer/sink.js:7:17)
at pull (/usr/src/app/node_modules/pull-stream/pull.js:43:9)
at Dialer.handle (/usr/src/app/node_modules/multistream-select/src/dialer/index.js:47:5)
at attemptMuxerUpgrade (/usr/src/app/node_modules/libp2p-switch/src/dial.js:164:10)
at gotWarmedUpConn (/usr/src/app/node_modules/libp2p-switch/src/dial.js:55:7)
at Switch.dial (/usr/src/app/node_modules/libp2p-switch/src/dial.js:41:9)
at _getPeerInfo (/usr/src/app/node_modules/libp2p/src/index.js:238:19)
I'm not saying that we should (or should not) fix this particular error, but rather when this error (and similar) happens, the daemon and gateway should not die but continue running.
Today, if there is a error in a stream or any other error within the daemon or the gateway, the entire process crashes. While not a problem for testing, it's a problem when deploying and trying to run a long-term daemon (for example, for the js-ipfs daemons).
I raised this before in #1243
Basically, we should be able to gracefully handle errors down the stack without having the daemon and gateway crash.
Current issue is the following error that happens every ~10 minutes:
I'm not saying that we should (or should not) fix this particular error, but rather when this error (and similar) happens, the daemon and gateway should not die but continue running.