Updated Container restart

Signed-off-by: FrenchBen <me@frenchben.com>
This commit is contained in:
FrenchBen 2015-08-27 14:18:46 -04:00
parent a30f1cc185
commit bc78ab64ba
1 changed files with 8 additions and 8 deletions

View File

@ -262,17 +262,17 @@ export default {
}, },
restart (name) { restart (name) {
let container = this.client.getContainer(name); this.client.getContainer(name).stop(stopError => {
container.stop(error => { if (stopError && stopError.statusCode !== 304) {
if (error && error.statusCode !== 304) { containerServerActions.error({name, stopError});
containerServerActions.error({name, error});
return; return;
} }
container.inspect((error, data) => { this.client.getContainer(name).start(startError => {
if (error) { if (startError && startError.statusCode !== 304) {
containerServerActions.error({name, error}); containerServerActions.error({name, startError});
return;
} }
this.startContainer(name, data); this.fetchContainer(name);
}); });
}); });
}, },