Skip to content

Commit 6ddbe6a

Browse files
committed
Close connection after version check
1 parent 8390432 commit 6ddbe6a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Diff for: packages/pg/test/integration/client/idle_in_transaction_session_timeout-tests.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ function testClientVersion(cb) {
1414
var client = new Client({})
1515
client.connect(assert.success(function () {
1616
helper.versionGTE(client, 100000, assert.success(function(isGreater) {
17-
if (!isGreater) {
18-
console.log('skip idle_in_transaction_session_timeout at client-level is only available in v10 and above');
19-
return client.end();
20-
}
21-
cb();
17+
return client.end(assert.success(function () {
18+
if (!isGreater) {
19+
console.log('skip idle_in_transaction_session_timeout at client-level is only available in v10 and above');
20+
return;
21+
}
22+
cb();
23+
}))
2224
}))
2325
}))
2426
}

0 commit comments

Comments
 (0)