Closed
Labels
httpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.
Description
This is a bit confusing for me. The comments for ClientRequest._deferToConnect says:
This function is for calls that need to happen once the socket is connected and writable.
However, looking at the code it is enough for the socket to be writable.
const onSocket = () => {
if (this.socket.writable) {
// assert(!this.socket.connecting); This could fail
callSocketMethod();
} else {
this.socket.once('connect', callSocketMethod);
}
};Which does not have to mean that the socket is connected.
As is evident in Socket.connect where writable and connecting is both set to true.
this.connecting = true;
this.writable = true;Is this a potential bug or just confusing description?
Metadata
Metadata
Assignees
Labels
httpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.
Activity
lpinca commentedon Jun 23, 2019
Fixed by #27876.