diff --git a/src/smtp/smtp.ts b/src/smtp/smtp.ts index 1d87c53..773e90d 100644 --- a/src/smtp/smtp.ts +++ b/src/smtp/smtp.ts @@ -28,7 +28,7 @@ export const checkSMTP = async ( socket.emit('fail', 'Mail server closed connection without sending any data.') } }) - socket.on('fail', msg => { + socket.once('fail', msg => { r(createOutput('smtp', msg)) if (socket.writable && !socket.destroyed) { socket.write(`quit\r\n`)