cody-greene / node-rabbitmq-client

RabbitMQ (0-9-1) client library with auto-reconnect & zero dependencies
MIT License
130 stars 9 forks source link

fix: aws-lambda, send() won't hang after reconnect #46

Closed cody-greene closed 8 months ago

cody-greene commented 8 months ago

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.