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:
parent
77f2fea1e1
commit
2884151a73
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user