In the event that the current promise triggers another Channel operation serviced by this QueueHandler, channelRead() becomes re-entrant, and crashes with an assertion failure because the last callback in the queue is called twice, and then removed twice.
Instead, tidy up and remove the last handler before satisfying the promise.
@jseibert will merge this for 3.0.2, but is there any way you could provide a snippet to recreate the error? I would like to include that in a unit test somewhere so that we can make sure there are no regressions.
In the event that the current promise triggers another Channel operation serviced by this QueueHandler, channelRead() becomes re-entrant, and crashes with an assertion failure because the last callback in the queue is called twice, and then removed twice.
Instead, tidy up and remove the last handler before satisfying the promise.