Fix for metrics exceptions on startup

This commit is contained in:
lishid
2012-02-11 17:45:52 -05:00
parent 2c7655424c
commit 80ad1f971a
2 changed files with 8 additions and 4 deletions

View File

@@ -182,14 +182,18 @@ public class Metrics {
}
// First tell the server about us
postPlugin(plugin, false);
try {
postPlugin(plugin, false);
} catch (Exception e) {
System.out.println("[Metrics] " + e.getMessage());
}
// Ping the server in intervals
plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable() {
public void run() {
try {
postPlugin(plugin, true);
} catch (IOException e) {
} catch (Exception e) {
System.out.println("[Metrics] " + e.getMessage());
}
}