test: Timeout#unref() does not return instance

Timeout#unref() call returns undefined, not this. The test already
worked before, because the interval was still unref'd, and the test also
succeeds without clearing the interval.

PR-URL: https://github.com/joyent/node/pull/9171
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>

Conflicts:
	test/simple/test-timers-unref.js
pull/835/head
Jan Schär 2015-02-09 16:51:12 +01:00 committed by cjihrig
parent 30dca66958
commit 3b1b4de903
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ setTimeout(function() {
interval = setInterval(function() {
unref_interval = true;
clearInterval(interval);
}, SHORT_TIME).unref();
}, SHORT_TIME);
interval.unref();
setTimeout(function() {
unref_timer = true;