File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
driver-async/src/main/com/mongodb/async/client/internal Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,7 @@ public void close() {
242
242
commandMarker .close ();
243
243
}
244
244
keyRetriever .close ();
245
+ keyManagementService .close ();
245
246
}
246
247
247
248
private void executeStateMachine (final MongoCryptContext cryptContext , final String databaseName ,
Original file line number Diff line number Diff line change 40
40
41
41
class KeyManagementService {
42
42
private final int defaultPort ;
43
+ private final TlsChannelStreamFactoryFactory tlsChannelStreamFactoryFactory ;
43
44
private final StreamFactory streamFactory ;
44
45
45
46
KeyManagementService (final SSLContext sslContext , final int defaultPort , final int timeoutMillis ) {
46
47
this .defaultPort = defaultPort ;
47
- this .streamFactory = new TlsChannelStreamFactoryFactory ().create (SocketSettings .builder ()
48
+ this .tlsChannelStreamFactoryFactory = new TlsChannelStreamFactoryFactory ();
49
+ this .streamFactory = tlsChannelStreamFactoryFactory .create (SocketSettings .builder ()
48
50
.connectTimeout (timeoutMillis , TimeUnit .MILLISECONDS )
49
51
.readTimeout (timeoutMillis , TimeUnit .MILLISECONDS )
50
52
.build (),
51
53
SslSettings .builder ().enabled (true ).context (sslContext ).build ());
52
54
}
53
55
56
+
57
+ public void close () {
58
+ tlsChannelStreamFactoryFactory .close ();
59
+ }
60
+
54
61
void decryptKey (final MongoKeyDecryptor keyDecryptor , final SingleResultCallback <Void > callback ) {
55
62
streamOpen (keyDecryptor , callback );
56
63
}
You can’t perform that action at this time.
0 commit comments