Skip to content

Commit

Permalink
Clear timeout upon stop to avoid hanging the process
Browse files Browse the repository at this point in the history
  • Loading branch information
nromito committed Apr 15, 2022
1 parent ed749c6 commit 463e193
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions simple-git/src/lib/plugins/timout-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function timeoutPlugin({block}: Exclude<SimpleGitOptions['timeout'], unde
context.spawned.stderr?.off('data', wait);
context.spawned.off('exit', stop);
context.spawned.off('close', stop);
timeout && clearTimeout(timeout);
}

function kill() {
Expand Down

0 comments on commit 463e193

Please sign in to comment.