An error in the multiplexer was emitting an error event on the multiplexer instance. There is no way to handle this error - only mux.stream is returned from replicate() and there is no mux.on('error') in the replicate() method. This causes an unhandled error in Node, so things just break on error.
I don't think we need to emit errors on the multiplexer instance, because the error is emitted on the stream returned from the replicate() function which is handled in https://github.com/kappa-db/multifeed/blob/master/mux.js#L140this.stream.destroy(err), so error handling is done via the stream not the multiplexer instance.
merge #38 before this.
An error in the multiplexer was emitting an error event on the multiplexer instance. There is no way to handle this error - only
mux.stream
is returned fromreplicate()
and there is nomux.on('error')
in thereplicate()
method. This causes an unhandled error in Node, so things just break on error.I don't think we need to emit errors on the multiplexer instance, because the error is emitted on the stream returned from the
replicate()
function which is handled in https://github.com/kappa-db/multifeed/blob/master/mux.js#L140this.stream.destroy(err)
, so error handling is done via the stream not the multiplexer instance.