Permalink
Browse files

TransportHttp does not honor timeout setting

This can result in an infinitely hanging IDE.

Change-Id: I669bc8d220a07011a42edf79de31825305ff3763
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
  • Loading branch information...
1 parent 9a6a433 commit fe76b410386dc6ec45195878e9a59f74f2768685 @mathiaskinzler mathiaskinzler committed Aug 10, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
@@ -379,6 +379,8 @@ final HttpURLConnection httpOpen(final URL u) throws IOException {
conn.setRequestProperty(HDR_ACCEPT_ENCODING, ENCODING_GZIP);
conn.setRequestProperty(HDR_PRAGMA, "no-cache");//$NON-NLS-1$
conn.setRequestProperty(HDR_USER_AGENT, userAgent);
+ conn.setConnectTimeout(getTimeout() * 1000);
+ conn.setReadTimeout(getTimeout() * 1000);
return conn;
}

0 comments on commit fe76b41

Please sign in to comment.