From 056b3d827379bba77d5ca370a1b257a1cd45bc6b Mon Sep 17 00:00:00 2001 From: hackthetime Date: Thu, 26 Oct 2023 13:39:57 +0200 Subject: readded disconnect check --- .../common/communication/BBsentialConnection.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/de/hype/bbsentials/common/communication/BBsentialConnection.java b/common/src/main/java/de/hype/bbsentials/common/communication/BBsentialConnection.java index 56aa052..f5d83a7 100644 --- a/common/src/main/java/de/hype/bbsentials/common/communication/BBsentialConnection.java +++ b/common/src/main/java/de/hype/bbsentials/common/communication/BBsentialConnection.java @@ -147,14 +147,14 @@ public class BBsentialConnection { String message = reader.readLine(); if (message != null) { onMessageReceived(message); -// else { -// Chat.sendPrivateMessageToSelfError("BB: It seemed like you disconnected. Reconnecting..."); -// BBsentials.connectToBBserver(); -// try { -// Thread.sleep(1000 * 10); -// } catch (Exception ignored) { -// } -// } + } + else { + Chat.sendPrivateMessageToSelfError("BB: It seemed like you disconnected. Reconnecting..."); + BBsentials.connectToBBserver(); + try { + Thread.sleep(1000 * 10); + } catch (Exception ignored) { + } } } } catch (IOException e) { -- cgit