node_modules: update (#338)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurlaanddawidd6 authored and GitHub committed 2026-10-03 10:23:35 +02:00
1 parent e1936242ed
commit a9c5eb6c35
39 files changed
+799 -388

No files matched your search

+17 -27
View File
@@ -139,31 +139,6 @@ class SMTPTransport extends EventEmitter {
connection.close();
return callback(err);
});
connection.once('end', () => {
if (returned) {
return;
}
const timer = setTimeout(() => {
if (returned) {
return;
}
returned = true;
cleanupPerCallAuth();
// still have not returned, this means we have an unexpected connection close
const err = new Error('Unexpected socket close');
if (connection && connection.upgrading) {
// starttls connection errors
err.code = errors.ETLS;
}
callback(err);
}, 1000);
try {
timer.unref();
}
catch (_E) {
// Ignore. Happens on envs with non-node timer implementation
}
});
const sendMessage = () => {
const envelope = mail.message.getEnvelope();
const messageId = mail.message.messageId();
@@ -183,6 +158,10 @@ class SMTPTransport extends EventEmitter {
messageId
}, 'Sending message %s to <%s>', messageId, recipients.join(', '));
connection.send(envelope, mail.message.createReadStream(), (err, info) => {
if (returned) {
// the connection error handler has already reported this send
return;
}
returned = true;
cleanupPerCallAuth();
connection.close();
@@ -209,10 +188,16 @@ class SMTPTransport extends EventEmitter {
}
});
};
connection.connect(() => {
connection.connect(err => {
if (returned) {
return;
}
if (err) {
// the server closed the connection before the greeting
returned = true;
connection.close();
return callback(err);
}
perCallAuth = this.getAuth(mail.data.auth);
if (perCallAuth && (connection.allowsAuth || options.forceAuth)) {
connection.login(perCallAuth, err => {
@@ -294,10 +279,15 @@ class SMTPTransport extends EventEmitter {
connection.quit();
return done(null, true);
};
connection.connect(() => {
connection.connect(err => {
if (returned) {
return;
}
if (err) {
returned = true;
connection.close();
return done(err);
}
perCallAuth = this.getAuth({});
if (perCallAuth && (connection.allowsAuth || options.forceAuth)) {
connection.login(perCallAuth, err => {