2 var common = require('../common');
3 var http = require('http');
4 var assert = require('assert');
6 var server = http.createServer(function(req, res) {
7 assert(false); // should not be called
10 server.listen(common.PORT, function() {
11 var req = http.request({method: 'GET', host: '127.0.0.1', port: common.PORT});
13 req.on('error', function(ex) {
14 // https://github.com/joyent/node/issues/1399#issuecomment-2597359
15 // abort() should emit an Error, not the net.Socket object
16 assert(ex instanceof Error);