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

google - timeout exception  RSS feed

 
Kannan Sundararaj
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one please help me why the following code throws a connection timed out exception



Output:

Exception java.net.ConnectException: Connection timed out: connect

Regards
Kannan.S
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're not going to use a connection for output, then you should call setDoOutput with a value of false, not true.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!