11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst net = require('net');
41cb0ef41Sopenharmony_ciconst server = net.createServer();
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_ci// Unref before listening
71cb0ef41Sopenharmony_ciserver.unref();
81cb0ef41Sopenharmony_ciserver.listen();
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ci// If the timeout fires, that means the server held the event loop open
111cb0ef41Sopenharmony_ci// and the unref() was not persistent. Close the server and fail the test.
121cb0ef41Sopenharmony_cisetTimeout(common.mustNotCall(), 1000).unref();
13