mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-10-09 18:04:08 +07:00
node_modules: update (#332)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
1 parent
c1dac70e3a
commit
6bf0a2f26a
95 files changed
+1102
-503
No files matched your search
+9
-7
@@ -151,7 +151,7 @@ class SMTPTransport extends EventEmitter {
|
||||
cleanupPerCallAuth();
|
||||
// still have not returned, this means we have an unexpected connection close
|
||||
const err = new Error('Unexpected socket close');
|
||||
if (connection && connection._socket && connection._socket.upgrading) {
|
||||
if (connection && connection.upgrading) {
|
||||
// starttls connection errors
|
||||
err.code = errors.ETLS;
|
||||
}
|
||||
@@ -241,9 +241,11 @@ class SMTPTransport extends EventEmitter {
|
||||
callback = shared.callbackPromise(resolve, reject);
|
||||
});
|
||||
}
|
||||
// the error paths hand over the error alone
|
||||
const done = callback;
|
||||
this.getSocket(this.options, (err, socketOptions) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
return done(err);
|
||||
}
|
||||
let options = this.options;
|
||||
if (socketOptions && socketOptions.connection) {
|
||||
@@ -273,7 +275,7 @@ class SMTPTransport extends EventEmitter {
|
||||
returned = true;
|
||||
cleanupPerCallAuth();
|
||||
connection.close();
|
||||
return callback(err);
|
||||
return done(err);
|
||||
});
|
||||
connection.once('end', () => {
|
||||
if (returned) {
|
||||
@@ -281,7 +283,7 @@ class SMTPTransport extends EventEmitter {
|
||||
}
|
||||
returned = true;
|
||||
cleanupPerCallAuth();
|
||||
return callback(new Error('Connection closed'));
|
||||
return done(new Error('Connection closed'));
|
||||
});
|
||||
const finalize = () => {
|
||||
if (returned) {
|
||||
@@ -290,7 +292,7 @@ class SMTPTransport extends EventEmitter {
|
||||
returned = true;
|
||||
cleanupPerCallAuth();
|
||||
connection.quit();
|
||||
return callback(null, true);
|
||||
return done(null, true);
|
||||
};
|
||||
connection.connect(() => {
|
||||
if (returned) {
|
||||
@@ -306,7 +308,7 @@ class SMTPTransport extends EventEmitter {
|
||||
if (err) {
|
||||
returned = true;
|
||||
connection.close();
|
||||
return callback(err);
|
||||
return done(err);
|
||||
}
|
||||
finalize();
|
||||
});
|
||||
@@ -317,7 +319,7 @@ class SMTPTransport extends EventEmitter {
|
||||
returned = true;
|
||||
cleanupPerCallAuth();
|
||||
connection.close();
|
||||
return callback(err);
|
||||
return done(err);
|
||||
}
|
||||
else {
|
||||
finalize();
|
||||
|
||||
Reference in new issue
Block a user