node:https: fix prototype chain of Agent (#15160)

Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
This commit is contained in:
Meghan Denny
2024-11-14 19:03:16 -08:00
committed by GitHub
parent 9a6f033206
commit 266e033d6f
6 changed files with 18 additions and 9 deletions

View File

@@ -42,7 +42,7 @@ function Agent(options) {
this.maxCachedSessions = this.options.maxCachedSessions;
if (this.maxCachedSessions === undefined) this.maxCachedSessions = 100;
}
Agent.prototype = Object.create(http.Agent.prototype);
$toClass(Agent, "Agent", http.Agent);
Agent.prototype.createConnection = http.createConnection;
var https = {