- 
          
- 
        Couldn't load subscription status. 
- Fork 33.6k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Description
We have missed updating the docs.
This property is guaranteed to be an instance of the <net.Socket> class, a subclass of <stream.Duplex>, unless the user specified a socket type other than <net.Socket>.
Is no longer true. It will be null after detach and destroy.
Lines 246 to 250 in 265a47d
| ServerResponse.prototype.detachSocket = function detachSocket(socket) { | |
| assert(socket._httpMessage === this); | |
| socket.removeListener('close', onServerResponseClose); | |
| socket._httpMessage = null; | |
| this.socket = null; | 
Lines 661 to 666 in 265a47d
| req.destroyed = true; | |
| if (req.res) { | |
| // Detach socket from IncomingMessage to avoid destroying the freed | |
| // socket in IncomingMessage.destroy(). | |
| req.res.socket = null; | |
| } | 
node/lib/internal/streams/destroy.js
Lines 339 to 341 in 265a47d
| if (isServerRequest(stream)) { | |
| stream.socket = null; | |
| stream.destroy(err); | 
sveisvei and szmarczak
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.