diff --git a/test/parallel/test-net-can-reset-timeout.js b/test/parallel/test-net-can-reset-timeout.js index faa460e847aa08..ab630b7c9d1392 100644 --- a/test/parallel/test-net-can-reset-timeout.js +++ b/test/parallel/test-net-can-reset-timeout.js @@ -1,5 +1,8 @@ 'use strict'; const common = require('../common'); + +// Ref: https://github.com/nodejs/node-v0.x-archive/issues/481 + const net = require('net'); const server = net.createServer(common.mustCall(function(stream) { @@ -7,7 +10,7 @@ const server = net.createServer(common.mustCall(function(stream) { stream.resume(); - stream.on('timeout', common.mustCall(function() { + stream.once('timeout', common.mustCall(function() { console.log('timeout'); // try to reset the timeout. stream.write('WHAT.');