Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

NPE fix for my last commit

sixcoolerd9a02ed2779e
diff --git a/source/net/yacy/cora/protocol/http/HTTPClient.java b/source/net/yacy/cora/protocol/http/HTTPClient.java
index c82b28d6b..5cb3f4727 100644
--- a/source/net/yacy/cora/protocol/http/HTTPClient.java
+++ b/source/net/yacy/cora/protocol/http/HTTPClient.java
@@ -634,7 +634,7 @@ public class HTTPClient {
} catch (final IOException e) {
ConnectionInfo.removeConnection(httpUriRequest.hashCode());
httpUriRequest.abort();
- this.httpResponse.close();
+ if (this.httpResponse != null) this.httpResponse.close();
throw new IOException("Client can't execute: "
+ (e.getCause() == null ? e.getMessage() : e.getCause().getMessage())
+ " duration=" + Long.toString(System.currentTimeMillis() - time));