Fixes the problem where the promise of the outbound operation that causes a channel closure is notified after channelInactive()

- Fixes #1897