Fixed crash when restarting app.

This commit is contained in:
Sean Li 2014-08-28 19:52:58 -07:00
parent 5038b2e5e8
commit 06c4afec93
1 changed files with 5 additions and 2 deletions

View File

@ -136,7 +136,11 @@ var getFromImage = function (dockerfile) {
restartApp = function (app, callback) {
if (app.docker && app.docker.Id) {
try {
restartContainerSync(app.docker.Id);
} catch (e) {
console.error(e);
}
var containerData = getContainerDataSync(app.docker.Id);
Fiber(function () {
Apps.update(app._id, {$set: {
@ -145,7 +149,6 @@ restartApp = function (app, callback) {
}});
}).run();
callback(null);
// Use dig to refresh the DNS
exec('/usr/bin/dig dig ' + app.name + '.dev @172.17.42.1 ', function(err, out) {
console.log(out);