Permalink
Please
sign in to comment.
Browse files
test: reach res._dump after abort ClientRequest
PR-URL: #24191 Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
- Loading branch information...
Showing
with
22 additions
and 0 deletions.
| @@ -0,0 +1,22 @@ | |||
| 'use strict'; | |||
| const common = require('../common'); | |||
| const http = require('http'); | |||
| const net = require('net'); | |||
| const server = http.createServer(function(req, res) { | |||
| res.end(); | |||
| }); | |||
|
|
|||
| server.listen(0, common.mustCall(function() { | |||
| const req = http.request({ | |||
| port: this.address().port | |||
| }, common.mustCall()); | |||
|
|
|||
| req.on('abort', common.mustCall(function() { | |||
| server.close(); | |||
| })); | |||
|
|
|||
| req.end(); | |||
| req.abort(); | |||
|
|
|||
| req.emit('response', new http.IncomingMessage(new net.Socket())); | |||
| })); | |||
0 comments on commit
e96c60e