From 5324d3ef298a3a2de5896940230a665002e4e041 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Mon, 3 Jul 2023 21:10:48 +0700 Subject: [PATCH] synchronized? IDK maybe it will fix the stream closed exception if not then maybe i will make a write queue --- .../chayapak/chomens_bot/util/PersistentDataUtilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java index f7659af..c85e103 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java @@ -39,7 +39,7 @@ public class PersistentDataUtilities { // ? how do i clear the file contents without making a completely new FileWriter // or is this the only way? - public static void write () { + public static synchronized void write () { try { writer.close();