From f70d05ae49642f6510e22f16b6000204d08212c6 Mon Sep 17 00:00:00 2001 From: brenoepic <59066707+brenoepics@users.noreply.github.com> Date: Fri, 29 Apr 2022 22:36:35 -0300 Subject: [PATCH] Add better logging --- .../com/eu/habbo/habbohotel/items/YoutubeManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/YoutubeManager.java b/src/main/java/com/eu/habbo/habbohotel/items/YoutubeManager.java index 13739ff4..3672c6fd 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/YoutubeManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/YoutubeManager.java @@ -121,12 +121,14 @@ public class YoutubeManager { youtubeDataLoaderPool.shutdown(); try { - youtubeDataLoaderPool.awaitTermination(60, TimeUnit.SECONDS); + if(!youtubeDataLoaderPool.awaitTermination(60, TimeUnit.SECONDS)) + LOGGER.error("Youtube Manager -> Failed, timeout elapsed before termination!"); } catch (InterruptedException e) { LOGGER.error("Caught Exception", e); + Thread.currentThread().interrupt(); + } finally { + LOGGER.info("YouTube Manager -> Loaded! (" + (System.currentTimeMillis() - millis) + " MS)"); } - - LOGGER.info("YouTube Manager -> Loaded! (" + (System.currentTimeMillis() - millis) + " MS)"); }); }