From efe0664962df035d5453446d6fe1ee9bb1e878bc Mon Sep 17 00:00:00 2001 From: Matthew Runyon Date: Fri, 27 Oct 2023 10:10:53 -0500 Subject: [PATCH] Fix NullPointerException if connection is closed after server goes away (#4727) --- .../java/io/deephaven/web/client/api/WorkerConnection.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/WorkerConnection.java b/web/client-api/src/main/java/io/deephaven/web/client/api/WorkerConnection.java index b7eff98e4b4..7237e5b5a66 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/WorkerConnection.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/WorkerConnection.java @@ -673,7 +673,10 @@ public void forceClose() { } newSessionReconnect.disconnected(); - DomGlobal.clearTimeout(scheduledAuthUpdate); + if (scheduledAuthUpdate != null) { + DomGlobal.clearTimeout(scheduledAuthUpdate); + scheduledAuthUpdate = null; + } } public void setSessionTimeoutMs(double sessionTimeoutMs) {