Commit 221b517a9d76a11bd3aa26d46edb9deb9bd348d8
electron compat unref
Dominic Tarr committed on 6/10/2017, 2:04:20 AMParent: 48efa4f4f1d44115cba007a5b04bff15044b44d1
Files changed
lib/progress.js | changed |
lib/progress.js | ||
---|---|---|
@@ -22,9 +22,9 @@ | ||
22 | 22 | return (prog.current - prog.start) / (prog.target - prog.start) |
23 | 23 | } |
24 | 24 | |
25 | 25 | var prog = -1 |
26 | - setInterval(function () { | |
26 | + var int = setInterval(function () { | |
27 | 27 | var p = progress() |
28 | 28 | var r = 0, c = 0 |
29 | 29 | var tasks = [] |
30 | 30 | for(var k in p) { |
@@ -37,6 +37,7 @@ | ||
37 | 37 | prog = r |
38 | 38 | var msg = tasks.join(', ') |
39 | 39 | process.stdout.write(bar(prog) + ' ('+msg+')') |
40 | 40 | } |
41 | - }, 333).unref() | |
41 | + }, 333) | |
42 | + int.unref && int.unref() | |
42 | 43 | } |
Built with git-ssb-web