diff --git a/socketserver/db_mysql.js b/socketserver/db_mysql.js index 5a99a5a..d38da89 100644 --- a/socketserver/db_mysql.js +++ b/socketserver/db_mysql.js @@ -167,11 +167,12 @@ MysqlDB.prototype.execute = function(query, vars, callback, trans) { con.query(query, vars, function(err, rows) { if(err){ callback(err); - return con.rollback(); + con.rollback(); } else { callback(null, rows); - return con.commit(); + con.commit(); } + con.release(); }); }); } else {