diff --git a/test/simple/test-http-outgoing-finish.js b/test/simple/test-http-outgoing-finish.js index 7acea07c99..30a0119247 100644 --- a/test/simple/test-http-outgoing-finish.js +++ b/test/simple/test-http-outgoing-finish.js @@ -25,8 +25,10 @@ var assert = require('assert'); var http = require('http'); http.createServer(function(req, res) { - write(res); req.resume(); + req.on('end', function() { + write(res); + }); this.close(); }).listen(common.PORT, function() { var req = http.request({