Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

trouble with UnknownHostException  RSS feed

priscilla jolly
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a program that sends pages using the WCTP protocol, which basically means you do a URL post. If you lose your connection to the internet, you get an UnknownHostException. However, when the connection is re-established, you still get the UnknownHostException, and you will continue to get the exception every time you try to send (unless you re-start the app).
I have researched this problem, and I have found several bug reports and forums that mention several properties that you can set to zero, such as,, and networkaddress.cache.negative.ttl, to solve this problem. Supposedly the bad URL mapping is being cached. I have tried to use these in, and as command-line args to my program. None of these seem to work.
Any help would be appreciated.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!