Skip to content

Commit 8dbd30f

Browse files
committed
try waiting for session with plot
1 parent 9e9c951 commit 8dbd30f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

NetworkDynamicsInspector/src/timeseries.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,13 @@ function timeseries_card(app, key, session)
372372
# plot the thing
373373
onany(data, replot; update=true) do _dat, _
374374
task = @task begin
375+
while session.status == Bonito.UNINITIALIZED
376+
sleep(0.1)
377+
end
378+
if session.status == Bonito.CLOSED
379+
@debug "$key: Session closed, aborting plot"
380+
return
381+
end
375382
@debug "$key: Launch plot for valid_idxs[]"
376383
try
377384
empty!(ax)

0 commit comments

Comments
 (0)