How to reestablish the connection after a SocketException
posted 2 years ago
There is a project at work that makes calls out to Facebook.
Currently the code gets a socket exception sometimes. When it does it tries to clean up (code I added), sleeps and then retries. Problem is, it continues to get a socket exception so the clean up isn't working. The program finally gives up but subsequent runs of the program (it's cronned) work. I haven't used httpGet and httpClient before, does anyone have any advice on how to clean things up and reestablish the connection?