Browse Source

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>
stable-0.9
Mathias Kinzler 14 years ago
parent
commit
fe76b41038
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java

2
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java

@ -379,6 +379,8 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
conn.setRequestProperty(HDR_ACCEPT_ENCODING, ENCODING_GZIP); conn.setRequestProperty(HDR_ACCEPT_ENCODING, ENCODING_GZIP);
conn.setRequestProperty(HDR_PRAGMA, "no-cache");//$NON-NLS-1$ conn.setRequestProperty(HDR_PRAGMA, "no-cache");//$NON-NLS-1$
conn.setRequestProperty(HDR_USER_AGENT, userAgent); conn.setRequestProperty(HDR_USER_AGENT, userAgent);
conn.setConnectTimeout(getTimeout() * 1000);
conn.setReadTimeout(getTimeout() * 1000);
return conn; return conn;
} }

Loading…
Cancel
Save