mailserver: fix sending of double header
This commit is contained in:
@@ -46,7 +46,7 @@ async function proxyToMailContainer(port, pathname, req, res, next) {
|
||||
|
||||
req.clearTimeout(); // TODO: add timeout to mail server proxy logic instead of this
|
||||
mailserverProxy(req, res, function (error) {
|
||||
if (!error) return next();
|
||||
if (!error) return; // response was already sent by proxy, do not proceed to connect-lastmile
|
||||
|
||||
if (error.code === 'ECONNREFUSED') return next(new HttpError(424, 'Unable to connect to mail server'));
|
||||
if (error.code === 'ECONNRESET') return next(new HttpError(424, 'Unable to query mail server'));
|
||||
|
||||
Reference in New Issue
Block a user