From 9a6912f2e628e55a81e7551ac19ae0dc3d54a0b7 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Mon, 20 Jan 2014 18:39:36 +0100 Subject: [PATCH] if a http client thread is still running but we do not wait for it any more, call an interrupt --- source/net/yacy/cora/protocol/http/HTTPClient.java | 1 + 1 file changed, 1 insertion(+) diff --git a/source/net/yacy/cora/protocol/http/HTTPClient.java b/source/net/yacy/cora/protocol/http/HTTPClient.java index 7d4ac41ce..2092ee997 100644 --- a/source/net/yacy/cora/protocol/http/HTTPClient.java +++ b/source/net/yacy/cora/protocol/http/HTTPClient.java @@ -703,6 +703,7 @@ public class HTTPClient { }; t.start(); try {t.join(this.timeout);} catch (InterruptedException e) {} + if (t.isAlive()) try {t.interrupt();} catch (Throwable e) {} if (te[0] != null) throw te[0]; if (thr[0] == null) throw new IOException("timout to client after " + this.timeout + "ms"); this.httpResponse = thr[0];