removed synchronization again...

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7641 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent 96c32e87b0
commit 7c8e764201

@ -487,15 +487,20 @@ public class HTTPClient {
assert !hrequest.expectContinue(); assert !hrequest.expectContinue();
} }
synchronized (httpClient) { try {
// without synchronization we get an interruptedException here very often httpResponse = httpClient.execute(httpUriRequest, httpContext);
try { } catch (Exception ee) {
httpResponse = httpClient.execute(httpUriRequest, httpContext); // try again synchronized
} catch (IOException e) { synchronized (httpClient) {
ConnectionInfo.removeConnection(httpUriRequest.hashCode()); // without synchronization we get an InterruptedException here very often
httpUriRequest.abort(); try {
throw new IOException("Client can't execute: " + e.getMessage()); httpResponse = httpClient.execute(httpUriRequest, httpContext);
} } catch (IOException e) {
ConnectionInfo.removeConnection(httpUriRequest.hashCode());
httpUriRequest.abort();
throw new IOException("Client can't execute: " + e.getMessage());
}
}
} }
} }

Loading…
Cancel
Save