From 4f75d1cd424f5a106f4ec8f9a4ae7d66d9f3d57a Mon Sep 17 00:00:00 2001 From: Dylan Chen Date: Wed, 17 Jan 2024 12:30:57 +0800 Subject: [PATCH] fix --- src/frontend/src/session.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/session.rs b/src/frontend/src/session.rs index 36d1f4b915995..069a2b37c187c 100644 --- a/src/frontend/src/session.rs +++ b/src/frontend/src/session.rs @@ -1176,7 +1176,7 @@ impl Session for SessionImpl { // Hold the `exec_context` lock to ensure no new sql coming when unpin_snapshot. let guard = self.exec_context.lock(); // No running sql i.e. idle - if guard.is_none() { + if guard.as_ref().and_then(|weak| weak.upgrade()).is_none() { // Idle timeout. if let Some(elapse_since_last_idle_instant) = self.elapse_since_last_idle_instant() {