Skip to content

Commit

Permalink
fix: move channel connection logic from started() to starting() middl…
Browse files Browse the repository at this point in the history
…eware
  • Loading branch information
AndreMaz committed Feb 26, 2025
1 parent 3091e2c commit 51c9a6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,9 @@ module.exports = function ChannelsMiddleware(mwOpts) {
},

/**
* Start lifecycle hook of service
* This hook is called before broker starting.
*/
async started() {
async staring() {
logger.info("Channel adapter is connecting...");
await adapter.connect();
logger.debug("Channel adapter connected.");
Expand All @@ -453,7 +453,7 @@ module.exports = function ChannelsMiddleware(mwOpts) {
},

/**
* Stop lifecycle hook of service
* This hook is called after broker stopped.
*/
async stopped() {
logger.info("Channel adapter is disconnecting...");
Expand Down

0 comments on commit 51c9a6c

Please sign in to comment.