From 92f939f01a2e1b118739dc0121ca9ad0403425e7 Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Sun, 9 Feb 2020 22:53:34 -0500 Subject: [PATCH] make send() synchronous and drop all the various queues --- src/visualizer.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/visualizer.jl b/src/visualizer.jl index 53decb5..a12bbae 100644 --- a/src/visualizer.jl +++ b/src/visualizer.jl @@ -117,7 +117,11 @@ end function Base.write(core::CoreVisualizer, data) for connection in core.connections - WebSockets.writeguarded(connection, data) + if isopen(connection) + WebSockets.writeguarded(connection, data) + else + delete!(core.connections, connection) + end end end