src/muxer.js
function catchError (stream) {
  return {
    source: pull(
      stream.source,
      pullCatch((err) => {
        if (err.message === 'Channel destroyed') {
          return
        }
        return false
      })
    ),
    sink: stream.sink
  }
}
function catchError (stream) {
  return {
    source: pull(
      stream.source,
      pullCatch((err) => {
        if (err.message === 'Channel destroyed') {
          return
        }
        return false
      })
    ),
    sink: stream.sink
  }
}
function catchError ( stream ) { return { source : pull ( stream . source , pullCatch ( ( err ) => { if ( err . message === 'Channel destroyed' ) { return } return false } ) ) , sink : stream . sink } }
Catch error makes sure that even though we get the "Channel destroyed" error from when closing streams, that it's not leaking through since it's not really an error for us, channels shoul close cleanly.
Catch error makes sure that even though we get the Channel destroyed error from when closing streams that it s not leaking through since it s not really an error for us channels shoul close cleanly .