From bc78ab64ba8ed069b169eae6e2f4b572e6398d19 Mon Sep 17 00:00:00 2001 From: FrenchBen Date: Thu, 27 Aug 2015 14:18:46 -0400 Subject: [PATCH] Updated Container restart Signed-off-by: FrenchBen --- src/utils/DockerUtil.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/utils/DockerUtil.js b/src/utils/DockerUtil.js index 70b8f297d3..4e6a8cb473 100644 --- a/src/utils/DockerUtil.js +++ b/src/utils/DockerUtil.js @@ -262,17 +262,17 @@ export default { }, restart (name) { - let container = this.client.getContainer(name); - container.stop(error => { - if (error && error.statusCode !== 304) { - containerServerActions.error({name, error}); + this.client.getContainer(name).stop(stopError => { + if (stopError && stopError.statusCode !== 304) { + containerServerActions.error({name, stopError}); return; } - container.inspect((error, data) => { - if (error) { - containerServerActions.error({name, error}); + this.client.getContainer(name).start(startError => { + if (startError && startError.statusCode !== 304) { + containerServerActions.error({name, startError}); + return; } - this.startContainer(name, data); + this.fetchContainer(name); }); }); },