mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
https: fix connection checking interval not clearing on server close
The connection interval should close when httpsServer.close is called similarly to how it gets cleared when httpServer.close is called. Fixes: https://github.com/nodejs/node/issues/48373 PR-URL: https://github.com/nodejs/node/pull/48383 Backport-PR-URL: https://github.com/nodejs/node/pull/50194 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
This commit is contained in:
1 parent
7fc15b6d42
commit
29697229b6
6 files changed
+52
-3
No files matched your search
@@ -31,6 +31,7 @@ const {
|
||||
JSONStringify,
|
||||
ObjectAssign,
|
||||
ObjectSetPrototypeOf,
|
||||
ReflectApply,
|
||||
ReflectConstruct,
|
||||
} = primordials;
|
||||
|
||||
@@ -43,6 +44,7 @@ assertCrypto();
|
||||
const tls = require('tls');
|
||||
const { Agent: HttpAgent } = require('_http_agent');
|
||||
const {
|
||||
httpServerPreClose,
|
||||
Server: HttpServer,
|
||||
setupConnectionsTracking,
|
||||
storeHTTPOptions,
|
||||
@@ -98,6 +100,11 @@ Server.prototype.closeIdleConnections = HttpServer.prototype.closeIdleConnection
|
||||
|
||||
Server.prototype.setTimeout = HttpServer.prototype.setTimeout;
|
||||
|
||||
Server.prototype.close = function() {
|
||||
httpServerPreClose(this);
|
||||
ReflectApply(tls.Server.prototype.close, this, arguments);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a new `https.Server` instance.
|
||||
* @param {{
|
||||
|
||||
Reference in new issue
Block a user