We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1066b68 commit b5a8c7fCopy full SHA for b5a8c7f
test/parallel/test-net-persistent-ref-unref.js
@@ -6,7 +6,7 @@ const net = require('net');
6
const { internalBinding } = require('internal/test/binding');
7
const TCPWrap = internalBinding('tcp_wrap').TCP;
8
9
-const echoServer = net.createServer(function(conn) {
+const echoServer = net.createServer((conn) => {
10
conn.end();
11
});
12
@@ -29,12 +29,12 @@ TCPWrap.prototype.unref = function() {
29
30
echoServer.listen(0);
31
32
-echoServer.on('listening', function() {
+echoServer.on('listening', () => {
33
const sock = new net.Socket();
34
sock.unref();
35
sock.ref();
36
sock.connect(this.address().port);
37
- sock.on('end', function() {
+ sock.on('end', () => {
38
assert.strictEqual(refCount, 0);
39
echoServer.close();
40
0 commit comments