@ -23,6 +23,7 @@ function makeAssert(message) {
cp . ref ( ) ;
cp . ref ( ) ;
assert ( cp . _ handle . unrefed ( ) , false ) ;
assert ( cp . _ handle . unrefed ( ) , false ) ;
cp . _ handle . close ( common . mustCall ( ( ) => assert ( cp . _ handle . unrefed ( ) , true ) ) ) ;
cp . _ handle . close ( common . mustCall ( ( ) => assert ( cp . _ handle . unrefed ( ) , true ) ) ) ;
cp . _ handle . close ( common . fail ) ;
assert ( cp . _ handle . unrefed ( ) , false ) ;
assert ( cp . _ handle . unrefed ( ) , false ) ;
}
}
@ -41,6 +42,7 @@ function makeAssert(message) {
assert ( sock4 . _ handle . unrefed ( ) , false ) ;
assert ( sock4 . _ handle . unrefed ( ) , false ) ;
sock4 . _ handle . close (
sock4 . _ handle . close (
common . mustCall ( ( ) => assert ( sock4 . _ handle . unrefed ( ) , true ) ) ) ;
common . mustCall ( ( ) => assert ( sock4 . _ handle . unrefed ( ) , true ) ) ) ;
sock4 . _ handle . close ( common . fail ) ;
assert ( sock4 . _ handle . unrefed ( ) , false ) ;
assert ( sock4 . _ handle . unrefed ( ) , false ) ;
const sock6 = dgram . createSocket ( 'udp6' ) ;
const sock6 = dgram . createSocket ( 'udp6' ) ;
@ -52,6 +54,7 @@ function makeAssert(message) {
assert ( sock6 . _ handle . unrefed ( ) , false ) ;
assert ( sock6 . _ handle . unrefed ( ) , false ) ;
sock6 . _ handle . close (
sock6 . _ handle . close (
common . mustCall ( ( ) => assert ( sock6 . _ handle . unrefed ( ) , true ) ) ) ;
common . mustCall ( ( ) => assert ( sock6 . _ handle . unrefed ( ) , true ) ) ) ;
sock6 . _ handle . close ( common . fail ) ;
assert ( sock6 . _ handle . unrefed ( ) , false ) ;
assert ( sock6 . _ handle . unrefed ( ) , false ) ;
}
}
@ -68,6 +71,7 @@ function makeAssert(message) {
handle . ref ( ) ;
handle . ref ( ) ;
assert ( handle . unrefed ( ) , false ) ;
assert ( handle . unrefed ( ) , false ) ;
handle . close ( common . mustCall ( ( ) => assert ( handle . unrefed ( ) , true ) ) ) ;
handle . close ( common . mustCall ( ( ) => assert ( handle . unrefed ( ) , true ) ) ) ;
handle . close ( common . fail ) ;
assert ( handle . unrefed ( ) , false ) ;
assert ( handle . unrefed ( ) , false ) ;
}
}
@ -88,6 +92,7 @@ function makeAssert(message) {
assert ( server . _ unref , false ) ;
assert ( server . _ unref , false ) ;
server . _ handle . close (
server . _ handle . close (
common . mustCall ( ( ) => assert ( server . _ handle . unrefed ( ) , true ) ) ) ;
common . mustCall ( ( ) => assert ( server . _ handle . unrefed ( ) , true ) ) ) ;
server . _ handle . close ( common . fail ) ;
assert ( server . _ handle . unrefed ( ) , false ) ;
assert ( server . _ handle . unrefed ( ) , false ) ;
}
}
@ -103,5 +108,6 @@ function makeAssert(message) {
assert ( timer . _ handle . unrefed ( ) , false ) ;
assert ( timer . _ handle . unrefed ( ) , false ) ;
timer . _ handle . close (
timer . _ handle . close (
common . mustCall ( ( ) => assert ( timer . _ handle . unrefed ( ) , true ) ) ) ;
common . mustCall ( ( ) => assert ( timer . _ handle . unrefed ( ) , true ) ) ) ;
timer . _ handle . close ( common . fail ) ;
assert ( timer . _ handle . unrefed ( ) , false ) ;
assert ( timer . _ handle . unrefed ( ) , false ) ;
}
}