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