mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-01-04 07:02:45 +08:00
Suppress onconnect errors
This commit is contained in:
parent
3d1bce85a6
commit
3f50c9362e
1 changed files with 6 additions and 3 deletions
|
@ -76,9 +76,12 @@ class IMAPCommand {
|
|||
|
||||
if (!this.command || !this.tag) {
|
||||
let err = new Error('Invalid tag');
|
||||
errors.notifyConnection(this.connection, err, {
|
||||
payload: this.payload ? (this.payload.length < 256 ? this.payload : this.payload.toString().substr(0, 150) + '...') : false
|
||||
});
|
||||
if (this.payload) {
|
||||
// no payload means empty line
|
||||
errors.notifyConnection(this.connection, err, {
|
||||
payload: this.payload.length < 256 ? this.payload : this.payload.toString().substr(0, 150) + '...'
|
||||
});
|
||||
}
|
||||
this.connection.send('* BAD Invalid tag');
|
||||
return callback(err);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue