Skip to content

Commit

Permalink
Set channel isConnected to false when connection error
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Gomez committed May 18, 2018
1 parent 4bc4fc4 commit d37b592
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hapiness/rabbitmq",
"version": "1.4.0",
"version": "1.4.1",
"description": "Hapiness module for rabbitmq",
"main": "commonjs/index.js",
"types": "index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions src/module/managers/channel-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export class ChannelManager extends EventEmitter {
this._connection = connectionManager.connection;
this._prefetch = prefetch;
this._global = global;
this._connectionManager.on('error', () => {
this._isConnected = false;
});
}

get prefetch(): number {
Expand Down

0 comments on commit d37b592

Please sign in to comment.