mirror of
https://github.com/mariadb-corporation/mariadb-connector-nodejs.git
synced 2025-08-15 21:22:32 +00:00
[misc] various micro enhancement
* pool: connection validation check isValid, correcting cases when a connection wasn't valid returning no response. * cluster: ** ensure that when option `canRetry` is enable to not loop eternally if pool doesn't have connection anymore ** cluster end promise really returns Promise when pools are closed * add test for cluster with one node only / or one node working only
This commit is contained in:
@ -344,7 +344,7 @@ let conn;
|
||||
try {
|
||||
conn = await pool.getConnection();
|
||||
console.log('connected ! connection id is ' + conn.threadId);
|
||||
conn.release(); //release to pool
|
||||
await conn.release(); //release to pool
|
||||
} catch (err) {
|
||||
console.log('not connected due to error: ' + err);
|
||||
}
|
||||
@ -1270,7 +1270,7 @@ let conn;
|
||||
try {
|
||||
conn = await pool.getConnection();
|
||||
console.log("connected ! connection id is " + conn.threadId);
|
||||
conn.release(); //release to pool
|
||||
await conn.release(); //release to pool
|
||||
} catch (err) {
|
||||
console.log("not connected due to error: " + err);
|
||||
}
|
||||
|
Reference in New Issue
Block a user