summaryrefslogtreecommitdiff
path: root/backend/node/src
authorMichael Krelin <hacker@klever.net>2013-11-25 18:57:36 (UTC)
committer Michael Krelin <hacker@klever.net>2013-11-25 18:57:36 (UTC)
commit2c9aa9d30d3b833954b4fa584293e6e5a817f102 (patch) (side-by-side diff)
tree0b3b969e0da227862edd1210203b560996c877b8 /backend/node/src
parentbcfe3d4f277b5d87e5c3fd56479e07f194a37144 (diff)
downloadclipperz-2c9aa9d30d3b833954b4fa584293e6e5a817f102.zip
clipperz-2c9aa9d30d3b833954b4fa584293e6e5a817f102.tar.gz
clipperz-2c9aa9d30d3b833954b4fa584293e6e5a817f102.tar.bz2
PG: don't try to commit after rolling back
Diffstat (limited to 'backend/node/src') (more/less context) (ignore whitespace changes)
-rw-r--r--backend/node/src/clipperz.js2
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) {
rollback: function(cb) {
LOGGER.trace('SQL: rollback');
if(this.over) return cb(new Error('game over'));
return (this.over=true),C.query('ROLLBACK',function(e){D();cb&&cb(e)});
},
end: function(e,cb) {
- if(e) LOGGER.trace(e,"rolling back transaction due to an error"),this.rollback(cb);
+ if(e) return LOGGER.trace(e,"rolling back transaction due to an error"),this.rollback(cb);
this.commit(cb);
}
});
});
});
}