You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
379 B

'use strict';
const common = require('../common');
// Make sure handle._handle.close(callback) is idempotent by closing a timer
// twice. The first function should be called, the second one should not.
const Timer = process.binding('timer_wrap').Timer;
const t = new Timer();
t.close(common.mustCall(function() {}));
t.close(() => common.fail('This should never be called'));