-rw-r--r-- | backend/node/src/clipperz.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/node/src/clipperz.js b/backend/node/src/clipperz.js index 6c13f16..6bf56bb 100644 --- a/backend/node/src/clipperz.js +++ b/backend/node/src/clipperz.js | |||
@@ -63,13 +63,13 @@ var CLIPPERZ = module.exports = function(CONFIG) { | |||
63 | rollback: function(cb) { | 63 | rollback: function(cb) { |
64 | LOGGER.trace('SQL: rollback'); | 64 | LOGGER.trace('SQL: rollback'); |
65 | if(this.over) return cb(new Error('game over')); | 65 | if(this.over) return cb(new Error('game over')); |
66 | return (this.over=true),C.query('ROLLBACK',function(e){D();cb&&cb(e)}); | 66 | return (this.over=true),C.query('ROLLBACK',function(e){D();cb&&cb(e)}); |
67 | }, | 67 | }, |
68 | end: function(e,cb) { | 68 | end: function(e,cb) { |
69 | if(e) LOGGER.trace(e,"rolling back transaction due to an error"),this.rollback(cb); | 69 | if(e) return LOGGER.trace(e,"rolling back transaction due to an error"),this.rollback(cb); |
70 | this.commit(cb); | 70 | this.commit(cb); |
71 | } | 71 | } |
72 | }); | 72 | }); |
73 | }); | 73 | }); |
74 | }); | 74 | }); |
75 | } | 75 | } |