Interrupt current thread.
parent
126c32ecd0
commit
5f80e02abd
|
@ -326,6 +326,7 @@ public class Spider implements Runnable, Task {
|
||||||
Thread.sleep(emptySleepTime);
|
Thread.sleep(emptySleepTime);
|
||||||
continue;
|
continue;
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -493,6 +494,7 @@ public class Spider implements Runnable, Task {
|
||||||
Thread.sleep(time);
|
Thread.sleep(time);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
logger.error("Thread interrupted when sleep",e);
|
logger.error("Thread interrupted when sleep",e);
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue