From e7d38d4782824eda602ded57f7b7b1e142456917 Mon Sep 17 00:00:00 2001 From: David Amorim Date: Mon, 30 May 2022 18:46:07 +0100 Subject: [PATCH] Reset connect attempts on successful resume --- .../java/moe/kyokobot/koe/gateway/MediaGatewayV4Connection.java | 2 ++ .../java/moe/kyokobot/koe/gateway/MediaGatewayV5Connection.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/src/main/java/moe/kyokobot/koe/gateway/MediaGatewayV4Connection.java b/core/src/main/java/moe/kyokobot/koe/gateway/MediaGatewayV4Connection.java index 32f7367..50ba7ec 100644 --- a/core/src/main/java/moe/kyokobot/koe/gateway/MediaGatewayV4Connection.java +++ b/core/src/main/java/moe/kyokobot/koe/gateway/MediaGatewayV4Connection.java @@ -111,6 +111,8 @@ protected void handlePayload(JsonObject object) { break; } case Op.RESUMED: { + connectAttempt = 0; + logger.debug("Resumed successfully"); break; } diff --git a/core/src/main/java/moe/kyokobot/koe/gateway/MediaGatewayV5Connection.java b/core/src/main/java/moe/kyokobot/koe/gateway/MediaGatewayV5Connection.java index 0fd6f56..0bf6deb 100644 --- a/core/src/main/java/moe/kyokobot/koe/gateway/MediaGatewayV5Connection.java +++ b/core/src/main/java/moe/kyokobot/koe/gateway/MediaGatewayV5Connection.java @@ -109,6 +109,8 @@ protected void handlePayload(JsonObject object) { break; } case Op.RESUMED: { + connectAttempt = 0; + logger.debug("Resumed successfully"); break; }