You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2024/12/16 13:21:01 UTC

(iotdb) branch master updated: Pipe: Fix the null pointer exception when the receiver closes the Session (#14446)

This is an automated email from the ASF dual-hosted git repository.

rong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 0d69f7149b8 Pipe: Fix the null pointer exception when the receiver closes the Session (#14446)
0d69f7149b8 is described below

commit 0d69f7149b8bdedaae62af20f0412fe2c6904959
Author: Zhenyu Luo <lu...@gmail.com>
AuthorDate: Mon Dec 16 21:20:55 2024 +0800

    Pipe: Fix the null pointer exception when the receiver closes the Session (#14446)
---
 .../java/org/apache/iotdb/db/protocol/session/SessionManager.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/SessionManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/SessionManager.java
index 5681affe8cf..8eb64cf0d87 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/SessionManager.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/SessionManager.java
@@ -327,7 +327,9 @@ public class SessionManager implements SessionManagerMBean {
    */
   public void removeCurrSession() {
     IClientSession session = currSession.get();
-    sessions.remove(session);
+    if (session != null) {
+      sessions.remove(session);
+    }
     currSession.remove();
     currSessionIdleTime.remove();
   }