correctly close idle connections #920

This commit is contained in:
SPRINX0\prochazka
2024-10-14 14:03:07 +02:00
parent 06753ff312
commit f80ae284fa
5 changed files with 38 additions and 25 deletions

View File

@@ -20,9 +20,10 @@ function start() {
if (handleProcessCommunication(connection)) return;
try {
const driver = requireEngineDriver(connection);
const conn = await connectUtility(driver, connection, 'app');
const res = await driver.getVersion(conn);
const dbhan = await connectUtility(driver, connection, 'app');
const res = await driver.getVersion(dbhan);
process.send({ msgtype: 'connected', ...res });
await driver.close(dbhan);
} catch (e) {
console.error(e);
process.send({