If the EncoderStream is destroyed after partially squeezing an
iterator, then it should invoke the saved write-callback with an error.
This only seems to happen, in practice, with aws lambda when the
exchange drops the connection while the lambda context is suspended.
Fixes https://github.com/cody-greene/node-rabbitmq-client/issues/45
If the EncoderStream is destroyed after partially squeezing an iterator, then it should invoke the saved write-callback with an error. This only seems to happen, in practice, with aws lambda when the exchange drops the connection while the lambda context is suspended.