• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

How to reestablish the connection after a SocketException

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

This is what the code looks like right now:



Any advice is greatly appreciated.

Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic