node_modules: update

This commit is contained in:
dawidd6 authored and github-actions[bot] committed 2026-11-20 17:41:12 +00:00
1 parent 0989b5499d
commit a20949df3b
21 files changed
+129 -34

No files matched your search

+11 -3
View File
@@ -145,6 +145,7 @@ function maskAuthCommand(cmd) {
* * **greetingTimeout** - Time to wait in ms until greeting message is received from the server (defaults to 30 seconds)
* * **connectionTimeout** - how many milliseconds to wait for the connection to establish (defaults to 2 minutes)
* * **socketTimeout** - Time of inactivity until the connection is closed (defaults to 10 minutes)
* * **socketCloseTimeout** - Time in ms to wait for the peer to close after ending the socket (defaults to 5 seconds, 0 destroys immediately)
* * **maxResponseSize** - Largest single server response to accept in bytes (defaults to 1 MB)
* * **dnsTimeout** - Time to wait in ms for the DNS requests to be resolved (defaults to 30 seconds)
* * **lmtp** - if true, uses LMTP instead of SMTP protocol
@@ -468,11 +469,18 @@ class SMTPConnection extends node_events_1.EventEmitter {
return;
}
this._closing = true;
const closeMethod = this.stage === 'init' ? 'destroy' : 'end';
// anything but a non-negative finite number keeps the default grace period
const configuredCloseTimeout = this.options.socketCloseTimeout;
const socketCloseTimeout = typeof configuredCloseTimeout === 'number' && Number.isFinite(configuredCloseTimeout) && configuredCloseTimeout >= 0
? configuredCloseTimeout
: CLOSE_TIMEOUT;
const closeMethod = this.stage === 'init' || socketCloseTimeout === 0 ? 'destroy' : 'end';
this.logger.debug({
tnx: 'smtp'
}, 'Closing connection to the server using "%s"', closeMethod);
const socket = (this._socket && this._socket.socket) || this._socket;
// after STARTTLS this is the TLS socket, tear that one down and not the plain socket it
// wraps (Node 27 exposes the wrapped socket as `.socket`)
const socket = this._socket;
// Detach any in-flight DATA stream from the socket so the source stream
// can be garbage-collected once the socket is gone.
if (this._currentDataStream) {
@@ -514,7 +522,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
if (closeMethod === 'end') {
// end() only closes our side, a server that never closes its own would keep
// the socket, and the process with it, around for good
const closeTimer = setTimeout(() => socket.destroy(), CLOSE_TIMEOUT);
const closeTimer = setTimeout(() => socket.destroy(), socketCloseTimeout);
if (typeof closeTimer.unref === 'function') {
closeTimer.unref();
}