Skip to content

Commit

Permalink
fix: remove unnecessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Jan 18, 2020
1 parent 094b408 commit 0ccae38
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/factories/createLightship.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ export default (userConfiguration?: ConfigurationInputType): LightshipType => {
log.info('received request to shutdown the service');

if (configuration.timeout !== Infinity) {
const timeoutId = setTimeout(() => {
setTimeout(() => {
log.warn('timeout occurred before all the shutdown handlers could run to completion; forcing termination');

// eslint-disable-next-line no-process-exit
process.exit(1);
}, configuration.timeout);
}, configuration.timeout)

// $FlowFixMe
timeoutId.unref();
// $FlowFixMe
.unref();
}

// @see https://github.com/gajus/lightship/issues/12
Expand Down Expand Up @@ -187,15 +187,15 @@ export default (userConfiguration?: ConfigurationInputType): LightshipType => {
}
});

const timeoutId = setTimeout(() => {
setTimeout(() => {
log.warn('process did not exit on its own; investigate what is keeping the event loop active');

// eslint-disable-next-line no-process-exit
process.exit(1);
}, 1000);
}, 1000)

// $FlowFixMe
timeoutId.unref();
// $FlowFixMe
.unref();
};

if (modeIsLocal) {
Expand Down

0 comments on commit 0ccae38

Please sign in to comment.