mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-10-09 09:59:45 +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
+8
-6
@@ -424,10 +424,12 @@ class SMTPPool extends EventEmitter {
|
||||
callback = shared.callbackPromise(resolve, reject);
|
||||
});
|
||||
}
|
||||
// the error paths hand over the error alone
|
||||
const done = callback;
|
||||
const auth = new PoolResource(this).auth;
|
||||
this.getSocket(this.options, (err, socketOptions) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
return done(err);
|
||||
}
|
||||
let options = this.options;
|
||||
if (socketOptions && socketOptions.connection) {
|
||||
@@ -449,14 +451,14 @@ class SMTPPool extends EventEmitter {
|
||||
}
|
||||
returned = true;
|
||||
connection.close();
|
||||
return callback(err);
|
||||
return done(err);
|
||||
});
|
||||
connection.once('end', () => {
|
||||
if (returned) {
|
||||
return;
|
||||
}
|
||||
returned = true;
|
||||
return callback(new Error('Connection closed'));
|
||||
return done(new Error('Connection closed'));
|
||||
});
|
||||
const finalize = () => {
|
||||
if (returned) {
|
||||
@@ -464,7 +466,7 @@ class SMTPPool extends EventEmitter {
|
||||
}
|
||||
returned = true;
|
||||
connection.quit();
|
||||
return callback(null, true);
|
||||
return done(null, true);
|
||||
};
|
||||
connection.connect(() => {
|
||||
if (returned) {
|
||||
@@ -478,7 +480,7 @@ class SMTPPool extends EventEmitter {
|
||||
if (err) {
|
||||
returned = true;
|
||||
connection.close();
|
||||
return callback(err);
|
||||
return done(err);
|
||||
}
|
||||
finalize();
|
||||
});
|
||||
@@ -488,7 +490,7 @@ class SMTPPool extends EventEmitter {
|
||||
err.code = errors.ENOAUTH;
|
||||
returned = true;
|
||||
connection.close();
|
||||
return callback(err);
|
||||
return done(err);
|
||||
}
|
||||
else {
|
||||
finalize();
|
||||
|
||||
Reference in new issue
Block a user