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() {
242242 commandMarker .close ();
243243 }
244244 keyRetriever .close ();
245+ keyManagementService .close ();
245246 }
246247
247248 private void executeStateMachine (final MongoCryptContext cryptContext , final String databaseName ,
Original file line number Diff line number Diff line change 4040
4141class KeyManagementService {
4242 private final int defaultPort ;
43+ private final TlsChannelStreamFactoryFactory tlsChannelStreamFactoryFactory ;
4344 private final StreamFactory streamFactory ;
4445
4546 KeyManagementService (final SSLContext sslContext , final int defaultPort , final int timeoutMillis ) {
4647 this .defaultPort = defaultPort ;
47- this .streamFactory = new TlsChannelStreamFactoryFactory ().create (SocketSettings .builder ()
48+ this .tlsChannelStreamFactoryFactory = new TlsChannelStreamFactoryFactory ();
49+ this .streamFactory = tlsChannelStreamFactoryFactory .create (SocketSettings .builder ()
4850 .connectTimeout (timeoutMillis , TimeUnit .MILLISECONDS )
4951 .readTimeout (timeoutMillis , TimeUnit .MILLISECONDS )
5052 .build (),
5153 SslSettings .builder ().enabled (true ).context (sslContext ).build ());
5254 }
5355
56+
57+ public void close () {
58+ tlsChannelStreamFactoryFactory .close ();
59+ }
60+
5461 void decryptKey (final MongoKeyDecryptor keyDecryptor , final SingleResultCallback <Void > callback ) {
5562 streamOpen (keyDecryptor , callback );
5663 }
You can’t perform that action at this time.
0 commit comments