Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3829 from LiskHQ/3368-remove_code_in_cleanup_chain
Browse files Browse the repository at this point in the history
Remove unnecessary argument code from cleanup - Closes #3368
  • Loading branch information
shuse2 authored Jun 18, 2019
2 parents f8b5d48 + 80bc241 commit cc55b7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions framework/src/modules/chain/chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,16 +260,11 @@ module.exports = class Chain {
};
}

async cleanup(code, error) {
async cleanup(error) {
this._unsubscribeToEvents();
const { modules, components } = this.scope;
if (error) {
this.logger.fatal(error.toString());
if (code === undefined) {
code = 1;
}
} else if (code === undefined || code === null) {
code = 0;
}
this.logger.info('Cleaning chain...');

Expand Down
2 changes: 1 addition & 1 deletion framework/src/modules/chain/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ module.exports = class ChainModule extends BaseModule {
}

async unload() {
return this.chain.cleanup(0);
return this.chain.cleanup();
}
};

0 comments on commit cc55b7c

Please sign in to comment.