diff --git a/lib/roles/app.js b/lib/roles/app.js index c6c76145..7260bbe7 100644 --- a/lib/roles/app.js +++ b/lib/roles/app.js @@ -258,7 +258,6 @@ module.exports = function(options) { socket.emit('tx.progress', channel.toString(), message) }) .on(wire.TransactionDoneMessage, function(channel, message) { - //leaveChannel(channel) socket.emit('tx.done', channel.toString(), message) }) .handler() @@ -323,6 +322,9 @@ module.exports = function(options) { ]) }) // Transactions + .on('tx.cleanup', function(channel) { + leaveChannel(channel) + }) .on('shell.command', function(channel, responseChannel, data) { joinChannel(responseChannel) push.send([ diff --git a/res/app/components/stf/control/transaction-service.js b/res/app/components/stf/control/transaction-service.js index 99741626..96097442 100644 --- a/res/app/components/stf/control/transaction-service.js +++ b/res/app/components/stf/control/transaction-service.js @@ -39,9 +39,9 @@ module.exports = function TransactionServiceFactory(socket) { .finally(function() { socket.removeListener('tx.done', doneListener) socket.removeListener('tx.progress', progressListener) + socket.emit('tx.cleanup', channel) }) .progressed(function() { - console.log('progressing') return results }) .then(function() {