3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Merge pull request #279 from hugmanrique/cleanup-task

Remove tasks from lookup map upon completion
Dieser Commit ist enthalten in:
Andrew Steinborn 2020-04-07 21:17:03 -04:00 committet von GitHub
Commit bb74fe769e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -3,7 +3,6 @@ package com.velocitypowered.proxy.scheduler;
import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
import com.google.common.collect.Multimaps; import com.google.common.collect.Multimaps;
@ -187,6 +186,9 @@ public class VelocityScheduler implements Scheduler {
} catch (Exception e) { } catch (Exception e) {
Log.logger.error("Exception in task {} by plugin {}", runnable, plugin, e); Log.logger.error("Exception in task {} by plugin {}", runnable, plugin, e);
} finally { } finally {
if (repeat == 0) {
onFinish();
}
currentTaskThread = null; currentTaskThread = null;
} }
}); });