diff --git a/print-server.js b/print-server.js index 903719f..60b8367 100644 --- a/print-server.js +++ b/print-server.js @@ -88,7 +88,7 @@ class PrintServer { await conn.beginTransaction(); [[printJob]] = await conn.query(selectQuery); if (!printJob) { - conn.rollback(); + await conn.rollback(); return; } @@ -97,7 +97,7 @@ class PrintServer { await conn.query(updateQuery, ['printing', null, jobId]); await conn.commit(); } catch (err) { - conn.rollback(); + await conn.rollback(); throw err; }