badmfck-api-server 2.2.8 → 2.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -206,7 +206,7 @@ class MysqlService extends BaseService_1.BaseService {
|
|
206
206
|
};
|
207
207
|
exports.REQ_MYSQL_TROLLBACK.listener = async (tid) => {
|
208
208
|
const trx = this.transactions.find(i => i.id === tid);
|
209
|
-
if (!trx)
|
209
|
+
if (!trx) {
|
210
210
|
return {
|
211
211
|
code: "NO_TRX",
|
212
212
|
errno: 100004,
|
@@ -215,11 +215,13 @@ class MysqlService extends BaseService_1.BaseService {
|
|
215
215
|
name: "NO_TRX",
|
216
216
|
message: "Transaction not found"
|
217
217
|
};
|
218
|
+
}
|
218
219
|
this.transactions = this.transactions.filter(i => i.id !== tid);
|
219
220
|
try {
|
220
221
|
await trx.conn.rollback();
|
221
222
|
trx.conn.removeAllListeners();
|
222
223
|
trx.conn.release();
|
224
|
+
trx.conn.end();
|
223
225
|
}
|
224
226
|
catch (e) {
|
225
227
|
(0, LogService_1.logError)("Can't rollback transaction");
|