Skip to content

Commit

Permalink
Fix closeConnection 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ammsalme committed Sep 6, 2024
1 parent 33352f3 commit edb7033
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/middleware/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,18 +295,18 @@ export default async ({

async function closeConnection() {
try {
logger.debug(`Closing connection: closeConnection`);
logger.verbose(`Closing connection: closeConnection`);
if (req.aborted === false && params.connection) {
await params.connection.break();
return params.connection.close({drop: true});
}
} catch (err) {
//logger.debug(err);
if (isExpectedOracleError(err) === false) {
return reject(err);
throw err;
}
logger.debug(`Connection already closed`);
return resolve();
logger.verbose(`Connection already closed`);
return;
}
}

Expand Down

0 comments on commit edb7033

Please sign in to comment.