Skip to content

Commit

Permalink
fix: child process should exit on disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
fengkx committed Jan 20, 2022
1 parent 2ea489a commit 91b9635
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions source/utils/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,6 @@ process.on('SIGUSR2', () => {
} => ${queue.length} Running: ${(queue.fastq as any).running()}`
);
});
process.on('disconnect', () => {
process.exit();
});
3 changes: 1 addition & 2 deletions source/utils/got.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import makeFetchHappen from 'make-fetch-happen';
import { config } from '../config';
import { proxyUrl } from './agent';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
// eslint-disable-next-line no-unused-vars
// @ts-expect-error make fetch happen textConverted function optional dependency
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import encoding from 'encoding';

export type FetchResponse = Awaited<ReturnType<makeFetchHappen.FetchInterface>>;
Expand Down

0 comments on commit 91b9635

Please sign in to comment.