Set and clear timeout for external requests
otherwise, the server crashes for a write after timeout
This commit is contained in:
@@ -43,6 +43,7 @@ function proxy(req, res, next) {
|
||||
proxyOptions.rejectUnauthorized = false;
|
||||
const mailserverProxy = middleware.proxy(proxyOptions);
|
||||
|
||||
req.clearTimeout(); // TODO: add timeout to mail server proxy logic instead of this
|
||||
mailserverProxy(req, res, function (error) {
|
||||
if (!error) return next();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user