Skip to content

Commit 749ca4b

Browse files
carlhoerbergbaelter
authored andcommitted
fixup! fix: propagate channel errors to connection and handle channel close properly
1 parent b5f55e5 commit 749ca4b

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/amqp-channel.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ export class AMQPChannel {
3131
this.onerror = (reason: string) => {
3232
this.logger?.error(`channel ${this.id} closed: ${reason}`)
3333
// Propagate channel errors to the connection's onerror handler
34-
if (this.id !== 0) { // Don't propagate for connection channel (id=0)
35-
this.connection.onerror(new AMQPError(`Channel ${this.id} closed: ${reason}`, this.connection))
36-
}
34+
this.connection.onerror(new AMQPError(`Channel ${this.id} closed: ${reason}`, this.connection))
3735
}
3836
}
3937

0 commit comments

Comments
 (0)