From d852eab5bfb6e8000d59f648860d70dfefef3b86 Mon Sep 17 00:00:00 2001 From: SimonDanisch Date: Sat, 5 Oct 2024 23:14:23 +0200 Subject: [PATCH] fix plotpane --- src/connection/websocket.jl | 2 +- src/display.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connection/websocket.jl b/src/connection/websocket.jl index 3ea650e2..72476f1e 100644 --- a/src/connection/websocket.jl +++ b/src/connection/websocket.jl @@ -139,7 +139,7 @@ function should_cleanup(policy::DefaultCleanupPolicy, session::Session) return false end -function allow_soft_close(policy::DefaultCleanupPolicy) +function allow_soft_close(policy::DefaultCleanupPolicy=CLEANUP_POLICY[]) return policy.cleanup_time > 0.0 end diff --git a/src/display.jl b/src/display.jl index 333a206f..642bd73c 100644 --- a/src/display.jl +++ b/src/display.jl @@ -122,7 +122,7 @@ end function Base.show(io::IO, ::MIME"juliavscode/html", app::App) # If we clean up sessions immediately and disallow reconnect # We might as well display the app directly! - if CLEANUP_TIME[] == 0.0 + if !allow_soft_close() show(io, MIME"text/html"(), app) else session = Session(title=app.title)