Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
fix: close the open channel after publishing msg
Browse files Browse the repository at this point in the history
  • Loading branch information
avdkishore committed Jan 31, 2020
1 parent 389e6a9 commit c85e6d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export default class RabbitMQ {
.sendToQueue(queueName, data, publishOptions)
.then(() => {
logger.log('data', { note: `Message sent to queue ${queueName}`, custom: { data } });
channelWrapper.close();
return Promise.resolve(data);
})
.catch(err => {
Expand Down

0 comments on commit c85e6d8

Please sign in to comment.