Merge pull request #983 from FrenchBen/fix-restart

Updated Container restart
This commit is contained in:
Jeffrey Morgan 2015-08-28 16:26:35 -07:00
commit b21ab918fe
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);
}); });
}); });
}, },