mailserver: make restart wait for restart
This commit is contained in:
@@ -20,8 +20,9 @@ const assert = require('assert'),
|
||||
services = require('../services.js'),
|
||||
url = require('url');
|
||||
|
||||
function restart(req, res, next) {
|
||||
mail.restartMail((error) => debug('Error restarting mail container', error));
|
||||
// because of how the proxy middleware works, the http response is already sent by the time this function is called
|
||||
async function restart(req, res, next) {
|
||||
await safe(mail.restartMail(), { debug });
|
||||
next();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user