Closed K-HT closed 6 years ago
You are welcome to look at the code, it's basically just one small file. I've read through it, and can't find any obvious places where this can happen. All sockets seems to be handled with try-with-resources, so the socket should be auto-closed. The documentation of ByteArrayOutputStream and ByteArrayInputStream says they don't need to be closed. And closing a socket, will close its corresponding inputstream and outputstream.
Thanks for your reply. I looked at the code.. but, shame on me, I didn't know the try-with-resources instruction. So I suspected that the socket was never closed. After reading documentation, it seems to be good.
I will look on my application to find something wrong. Sorry for the inconvenience.
No worries. Have another look at your application, and if you can't figure it out, I'll have another look. No one's perfect, so it could be a obscure bug related to closing of resources that I havent found.
Hello,
I used this clamAV client to scan some files. But after a lot of scanning I get this error : "java.net.SocketException: Too many open files" I suspect the client to not close some Socket or ressources.
Have you an idea?
Thanks