He-Pin commented on code in PR #3528:
URL: https://github.com/apache/pekko/pull/3528#discussion_r3947121774


##########
remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/PemManagersProvider.scala:
##########
@@ -90,4 +93,46 @@ private[ssl] object PemManagersProvider {
     certFactory.generateCertificate(Files.newInputStream(new 
File(filename).toPath))

Review Comment:
   `loadCertificates` closes its stream, but `loadCertificate` here still 
doesn't, and `CertificateFactory.generateCertificate` doesn't close the stream 
either — so every call leaks a file descriptor. 
`RotatingKeysSSLEngineProvider.readFiles` calls this for `SSLCertFile` on every 
rotation, so a long-lived rotating-keys system accumulates leaked handles over 
time. This PR is already editing this file; worth wrapping it in 
`try`/`finally` the same way.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to