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

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


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

commit 8084d07e7fa952bf1393ba09bb9a49c6668546ba
Author: Steve Yurong Su <[email protected]>
AuthorDate: Mon Dec 16 21:25:27 2024 +0800

    Pipe: Fix the null pointer exception when the receiver closes the Session 
(#14446) (#14453)
    
    (cherry picked from commit 0d69f7149b8bdedaae62af20f0412fe2c6904959)
    
    Co-authored-by: Zhenyu Luo <[email protected]>
---
 .../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 647a4729bde..1656a536995 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
@@ -309,7 +309,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();
   }

Reply via email to