X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FSoneInserter.java;h=15e054f957413db5725a818b893f1977b5a746df;hb=40a17ccc4208fd614211c8a3a69ebdf330161971;hp=b16d37418c5004f437619c1d5a2f549f93b60caa;hpb=07ca98b45465f7a442e695fbfb6f59100260f39b;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/core/SoneInserter.java b/src/main/java/net/pterodactylus/sone/core/SoneInserter.java
index b16d374..15e054f 100644
--- a/src/main/java/net/pterodactylus/sone/core/SoneInserter.java
+++ b/src/main/java/net/pterodactylus/sone/core/SoneInserter.java
@@ -160,7 +160,7 @@ public class SoneInserter extends AbstractService {
protected void serviceRun() {
long lastModificationTime = 0;
String lastFingerprint = "";
- while (!shouldStop()) {
+ while (!shouldStop()) { try {
/* check every seconds. */
sleep(1000);
@@ -236,7 +236,9 @@ public class SoneInserter extends AbstractService {
}
}
}
- }
+ } catch (Throwable t1) {
+ logger.log(Level.SEVERE, "SoneInserter threw an Exception!", t1);
+ }}
}
/**
@@ -246,7 +248,7 @@ public class SoneInserter extends AbstractService {
*
* @author David âBombeâ Roden
*/
- private class InsertInformation {
+ private static class InsertInformation {
/** All properties of the Sone, copied for thread safety. */
private final Map soneProperties = new HashMap();