Leave transaction channel when it's done. Could be made cleaner if more code was moved to the app side.

This commit is contained in:
Simo Kinnunen
2014-02-21 12:00:46 +09:00
parent 8769b8040c
commit 3b54213e97
2 changed files with 4 additions and 2 deletions

View File

@@ -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() {