dsql-admin/dsql-app/package-shared/utils/endConnection.js
Benjamin Toby 8b7ea057d0 Updates
2024-12-06 14:24:26 +01:00

17 lines
351 B
JavaScript

// @ts-check
const mysql = require("mysql");
/**
* @param {mysql.Connection} connection - the active MYSQL connection
*/
function endConnection(connection) {
if (connection.state !== "disconnected") {
connection.end((err) => {
console.log(err?.message);
});
}
}
module.exports = endConnection;