Skip to content

Commit 5b1f827

Browse files
authored
Merge pull request #274 from swaylq/master
Fix ``exit`` method bug
2 parents d8cd12f + a13b2b9 commit 5b1f827

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/createFFmpeg.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,14 @@ module.exports = (_options = {}) => {
180180
running = false;
181181
try {
182182
Core.exit(1);
183-
} catch(e) {
184-
console.log('catch core exit error', e);
183+
} catch (e) {
184+
log(e.message);
185+
} finally {
186+
Core = null;
187+
ffmpeg = null;
188+
runResolve = null;
185189
}
186-
Core = null;
187-
ffmpeg = null;
188-
runResolve = null;
190+
189191
}
190192
};
191193

0 commit comments

Comments
 (0)