NPE fix for my last commit

This commit is contained in:
sixcooler 2013-10-11 00:44:04 +02:00
parent 61f627eb85
commit d9a02ed277

View File

@ -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));