mailserver: fix sending of double header

This commit is contained in:
Girish Ramakrishnan
2023-11-26 15:40:21 +01:00
parent b5065a381f
commit a056bcfdfe

View File

@@ -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'));