Log an error if failing to stop a tty session

This commit is contained in:
Pagan Gazzard 2014-09-09 14:25:03 +01:00 committed by Pablo Carranza Vélez
parent a9672bd5af
commit 70eef70be2

View File

@ -46,7 +46,9 @@ exports.kill = kill = (app) ->
container = docker.getContainer(app.containerId)
console.log('Stopping and deleting container:', container)
tty.stop()
.catch(->) # Even if stopping the tty fails we want to finish stopping the container
.catch (err) ->
console.error('Error stopping tty', err)
return # Even if stopping the tty fails we want to finish stopping the container
.then ->
container.stopAsync()
.then ->