Skip to content

Commit 8f748c0

Browse files
authored
Fix problem where a failure during handle creation could leak threads
1 parent 22f19c7 commit 8f748c0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

driver/src/main/java/oracle/nosql/driver/SDKVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ public class SDKVersion {
1212
/**
1313
* The full X.Y.Z version of the current SDK
1414
*/
15-
public static final String VERSION = "5.1.18-SNAPSHOT";
15+
public static final String VERSION = "5.4.18-SNAPSHOT";
1616
}

driver/src/main/java/oracle/nosql/driver/http/NoSQLHandleImpl.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,14 @@ public NoSQLHandleImpl(NoSQLHandleConfig config) {
8282
*/
8383
configSslContext(config);
8484
client = new Client(logger, config);
85-
/* configAuthProvider may use client */
86-
configAuthProvider(logger, config);
85+
try {
86+
/* configAuthProvider may use client */
87+
configAuthProvider(logger, config);
88+
} catch (RuntimeException re) {
89+
/* cleanup client */
90+
client.shutdown();
91+
throw re;
92+
}
8793
}
8894

8995
/**

0 commit comments

Comments
 (0)