1
0
mirror of https://github.com/crawler-commons/crawler-commons synced 2024-09-22 09:10:42 +02:00

Don't clear interrupted flag when we throw an

AbortedFetchException.
This commit is contained in:
kkrugler_lists@transpac.com 2013-01-24 00:10:55 +00:00
parent 77f2fea1e1
commit 2884151a73

View File

@ -678,8 +678,8 @@ public class SimpleHttpFetcher extends BaseHttpFetcher {
throw new AbortedFetchException(url, "Slow response rate of " + readRate + " bytes/sec", AbortedFetchReason.SLOW_RESPONSE_RATE);
}
// Check to see if we got interrupted.
if (Thread.interrupted()) {
// Check to see if we got interrupted, but don't clear the interrupted flag.
if (Thread.currentThread().isInterrupted()) {
throw new AbortedFetchException(url, AbortedFetchReason.INTERRUPTED);
}
}