Skip to content

Commit da76951

Browse files
fix: fix console log
1 parent 7e7ddb9 commit da76951

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nestjstools/messaging-rabbitmq-extension",
3-
"version": "3.1.0",
3+
"version": "3.1.1",
44
"description": "Extension to handle messages and dispatch them over AMQP protocol",
55
"author": "Sebastian Iwanczyszyn",
66
"private": false,

src/channel/amqp.channel.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ export class AmqpChannel extends Channel<ExtensionAmqpChannelConfig> {
2020

2121
this.connection = await amqp.connect(this.config.connectionUri);
2222
this.connection.on('close', (err: any) => {
23-
console.error('AMQP Connection error:', err);
23+
if (err) {
24+
console.error('AMQP Connection error:', err);
25+
}
2426
process.exit(0);
2527
});
2628
}

0 commit comments

Comments
 (0)