Skip to content

Commit

Permalink
Follow-up to 912c2e5
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed Dec 14, 2019
1 parent 912c2e5 commit 7bf92f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/utils/timed-out.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default (request: ClientRequest, delays: Delays, options: TimedOutOptions
const cancelers: Array<typeof noop> = [];
const {once, unhandleAll} = unhandler();

const addTimeout = <T extends any[]>(delay: number, callback: (delay: number, ...args: T) => void, ...args: T): (typeof noop) => {
const timeout = setTimeout(callback, delay, ...args) as unknown as NodeJS.Timeout;
const addTimeout = (delay: number, callback: (delay: number, event: string) => void, event: string): (typeof noop) => {
const timeout = setTimeout(callback, delay, delay, event) as unknown as NodeJS.Timeout;

timeout.unref?.();

Expand Down

0 comments on commit 7bf92f4

Please sign in to comment.