correct Timeoutparamter at HttpComponents-Client-4.x

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6967 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
sixcooler 15 years ago
parent e1316d12d0
commit 2ad5829b26

@ -208,6 +208,7 @@ public class Client {
byte[] content = null; byte[] content = null;
final HttpContext httpContext = new BasicHttpContext(); final HttpContext httpContext = new BasicHttpContext();
httpUriRequest.getParams().setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, timeout); httpUriRequest.getParams().setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, timeout);
httpUriRequest.getParams().setIntParameter(CoreConnectionPNames.SO_TIMEOUT, timeout);
if (userAgent != null) if (userAgent != null)
httpUriRequest.getParams().setParameter(CoreProtocolPNames.USER_AGENT, userAgent); httpUriRequest.getParams().setParameter(CoreProtocolPNames.USER_AGENT, userAgent);
if (host != null) if (host != null)
@ -228,6 +229,7 @@ public class Client {
} }
} catch (final IOException e) { } catch (final IOException e) {
httpUriRequest.abort(); httpUriRequest.abort();
count--;
throw e; throw e;
} }
count--; count--;

Loading…
Cancel
Save