Code Monkey home page Code Monkey logo

Comments (8)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
It appears that the code reference may be off depending on the version of the 
api
(1.14.0 was the original reference). However, this is a more general problem.
Anywhere in the code where HttpUrlConnections are being created/made, they 
aren't
being setup with any connect/read timeouts, so each of these areas is affected. 

1.14.1 areas:

...gdata.client.http.AuthSubUtil
...gdata.client.http.HttpGDataRequest
...gdata.client.GoogleAuthTokenFactory

Original comment by [email protected] on 23 Oct 2007 at 11:29

from gdata-java-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
Also an issue with the migration API usages.  Had to use a separate timer 
thread and guess how long is too long, 
since there's no status from gdata on the connection should it drop.  If only 
gdata used the Apache HttpClient...

Original comment by [email protected] on 8 Sep 2008 at 3:41

from gdata-java-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
HttpGDataRequest has setConnectTimeout(int) and setReadTimeout(int).  Seems 
like it 
would be good to allow timeout to be specified for the other 
HttpURLConnection's.

Original comment by [email protected] on 6 Mar 2009 at 10:49

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from gdata-java-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
Internal Tracking ID: 1697100

Original comment by [email protected] on 6 Mar 2009 at 10:54

from gdata-java-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
I am getting the same error:
java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:507)
at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
at sun.net.www.http.HttpClient.New(HttpClient.java:287)
at sun.net.www.http.HttpClient.New(HttpClient.java:299)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient
(HttpURLConnection.java:792)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect
(HttpURLConnection.java:744)
at 
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669)
at 
com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:488)
at com.google.gdata.client.http.GoogleGDataRequest.execute
(GoogleGDataRequest.java:515)
at com.google.gdata.client.Service.getFeed(Service.java:1053)
at com.google.gdata.client.Service.getFeed(Service.java:916)
at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:631)
at com.google.gdata.client.Service.getFeed(Service.java:935)

Source:
YouTubeService service = new YouTubeService(CLIENT_ID, DEVELOPER_KEY);
service.setConnectTimeout(10000);
service.setReadTimeout(10000);
VideoFeed videoFeed = service.getFeed(new URL(FEED_URL), VideoFeed.class);

Original comment by [email protected] on 9 Nov 2009 at 6:42

from gdata-java-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
This bug just had its 2 year anniversary!  Congratulations!

Original comment by [email protected] on 9 Nov 2009 at 7:16

from gdata-java-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
Are we doing something about it?

Original comment by [email protected] on 27 Aug 2010 at 7:18

from gdata-java-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
In general we recommend migrating to google-api-java-client, which does have a 
default connection/read timeout of 20 seconds for all requests and allows you 
to customize it as a global variable:

http://code.google.com/p/google-api-java-client/

Original comment by [email protected] on 10 Sep 2010 at 11:17

  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

from gdata-java-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.