diff --git a/src/connectionFsm.js b/src/connectionFsm.js index 0045e8c..8665d7e 100644 --- a/src/connectionFsm.js +++ b/src/connectionFsm.js @@ -68,6 +68,10 @@ const Connection = function (options, connectionFn, channelFn) { channel.on('return', (raw) => { this.emit('return', raw); }); + channel.on('failed', () => { + this.transition('failed'); + this.handle('failed'); + }); }); } else { return Promise.resolve(channel);