diff --git a/lib/https.js b/lib/https.js index 041bd41edde5ec..715f86878ae99b 100644 --- a/lib/https.js +++ b/lib/https.js @@ -25,7 +25,6 @@ require('internal/util').assertCrypto(); const tls = require('tls'); const url = require('url'); -const util = require('util'); const { Agent: HttpAgent } = require('_http_agent'); const { Server: HttpServer, @@ -33,8 +32,7 @@ const { kServerResponse } = require('_http_server'); const { ClientRequest } = require('_http_client'); -const { inherits } = util; -const debug = util.debuglog('https'); +const debug = require('internal/util/debuglog').debuglog('https'); const { URL, urlToOptions, searchParamsSymbol } = require('internal/url'); const { IncomingMessage, ServerResponse } = require('http'); const { kIncomingMessage } = require('_http_common'); @@ -76,7 +74,8 @@ function Server(opts, requestListener) { this.maxHeadersCount = null; this.headersTimeout = 40 * 1000; // 40 seconds } -inherits(Server, tls.Server); +Object.setPrototypeOf(Server.prototype, tls.Server.prototype); +Object.setPrototypeOf(Server, tls.Server); Server.prototype.setTimeout = HttpServer.prototype.setTimeout;