Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 02:50:06 +01:00
Prevent exceptions from being thrown endlessly
Dieser Commit ist enthalten in:
Ursprung
8b69d8a8e2
Commit
57773765d7
@ -336,8 +336,9 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen
|
|||||||
Future next = submissions.peek();
|
Future next = submissions.peek();
|
||||||
while (next != null) {
|
while (next != null) {
|
||||||
if (next.isDone()) {
|
if (next.isDone()) {
|
||||||
|
Future after = null;
|
||||||
try {
|
try {
|
||||||
next = (Future) next.get();
|
after = (Future) next.get();
|
||||||
} catch (FaweException messageOnly) {
|
} catch (FaweException messageOnly) {
|
||||||
LOGGER.warn(messageOnly.getMessage());
|
LOGGER.warn(messageOnly.getMessage());
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException e) {
|
||||||
@ -350,6 +351,13 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen
|
|||||||
e.getCause().printStackTrace();
|
e.getCause().printStackTrace();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
/*
|
||||||
|
* If the execution failed, namely next.get() threw an exception,
|
||||||
|
* we don't want to process that Future again. Instead, we just drop
|
||||||
|
* it and set it to null, otherwise to the returned next Future.
|
||||||
|
*/
|
||||||
|
next = after;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren