I am experiencing an odd problem every now and then (too often actually).
I am running a server application, which is binding a socket for itself.
But once in a
if you think that the resources are not properly released, you can try to do the release in a shutdownhook. like this at least when its shut down the resouces will be released (not though if you hard kill)
an example for a very basic shutdownhook:
public void shutDownProceedure(){
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
/* my shutdown code here */
}
});
}
This helped me release resources that somehow weren't entirely released before. I don't know if this works for sockets as well, i think it should.
It also allowed me to see loggings i haven't seen before