]> source.dussan.org Git - jgit.git/commitdiff
TransportHttp does not honor timeout setting 76/1276/1
authorMathias Kinzler <mathias.kinzler@sap.com>
Tue, 10 Aug 2010 13:58:21 +0000 (15:58 +0200)
committerMathias Kinzler <mathias.kinzler@sap.com>
Tue, 10 Aug 2010 13:58:21 +0000 (15:58 +0200)
This can result in an infinitely hanging IDE.

Change-Id: I669bc8d220a07011a42edf79de31825305ff3763
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java

index 0f4c1314a3df9549e3f01a7476dbdb4325b1eea4..333f91bf093dfdda3a19c38b915b5d7f60cc6b00 100644 (file)
@@ -379,6 +379,8 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
                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;
        }