node_modules: update

This commit is contained in:
Dawid Dziurla
2021-07-14 08:08:23 +02:00
parent a1ab281c6f
commit ceb614a2c5
33 changed files with 323 additions and 190 deletions

View File

@ -873,16 +873,21 @@ class SMTPConnection extends EventEmitter {
});
this.upgrading = true;
this._socket = tls.connect(opts, () => {
this.secure = true;
this.upgrading = false;
this._socket.on('data', this._onSocketData);
// tls.connect is not an asynchronous function however it may still throw errors and requires to be wrapped with try/catch
try {
this._socket = tls.connect(opts, () => {
this.secure = true;
this.upgrading = false;
this._socket.on('data', this._onSocketData);
socketPlain.removeListener('close', this._onSocketClose);
socketPlain.removeListener('end', this._onSocketEnd);
socketPlain.removeListener('close', this._onSocketClose);
socketPlain.removeListener('end', this._onSocketEnd);
return callback(null, true);
});
return callback(null, true);
});
} catch (err) {
return callback(err);
}
this._socket.on('error', this._onSocketError);
this._socket.once('close', this._onSocketClose);