Closed dargolith closed 5 years ago
Versions
orient-js: 3.0.1 orientdb: 3.0.10
Problem If the OrientDBClient.session call throws (for instance of the db doesn't exist) it seems impossible to cleanup the client state (?), thus preventing expected termination.
Code
const { OrientDBClient } = require('orientjs'); const test = async () => { const orientClient = await OrientDBClient.connect({ host: 'localhost', port: 2424 }); try { await orientClient.session({ name: 'incorrectDbName', // Non-existing db to make the call throw username: 'user', password: 'pw', }); } catch (err) { console.log('Error:', err); } finally { await orientClient.close(); } }; test();
Expected behavior To terminate correctly.
Actual behavior Locks / hangs forever.
Hi @dargolith
i've just pushed a fix. It will be available in the next OrientJS version 3.0.2
Thanks
Great! :) Thanks!
OrientJS 3.0.2 is available on NPM with this fix. Thanks
Versions
Problem If the OrientDBClient.session call throws (for instance of the db doesn't exist) it seems impossible to cleanup the client state (?), thus preventing expected termination.
Code
Expected behavior To terminate correctly.
Actual behavior Locks / hangs forever.