From 3da5bb07867d4cf625a15ba970e413a14325e651 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 8 Oct 2023 14:00:03 +0100 Subject: [PATCH] Allow unlimited reconnections if we make progress Signed-off-by: Graham --- .../kotlin/org/openrs2/archive/cache/Js5ChannelHandler.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/archive/src/main/kotlin/org/openrs2/archive/cache/Js5ChannelHandler.kt b/archive/src/main/kotlin/org/openrs2/archive/cache/Js5ChannelHandler.kt index f922c5b8..ad0abaad 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/cache/Js5ChannelHandler.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/cache/Js5ChannelHandler.kt @@ -254,6 +254,12 @@ public abstract class Js5ChannelHandler( continuation.resume(Unit) ctx.close() + } else { + /* + * Reset the number of reconnection attempts as we are making + * progress. + */ + reconnectionAttempts = 0 } }