Skip to content

Commit

Permalink
Minor fixes for comm cleanup (#3120)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Nov 2, 2018
1 parent 058b655 commit fce0fe7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion holoviews/plotting/bokeh/callbacks.py
Expand Up @@ -74,7 +74,10 @@ def cleanup(self):
self.source = None
self.streams = []
if self.comm:
self.comm.close()
try:
self.comm.close()
except:
pass
Callback._callbacks = {k: cb for k, cb in Callback._callbacks.items()
if cb is not self}

Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/bokeh/plot.py
Expand Up @@ -300,7 +300,7 @@ def cleanup(self):
if get_method_owner(subscriber) not in plots
]

if self.comm:
if self.comm and self.root is self.handles.get('plot'):
self.comm.close()


Expand Down

0 comments on commit fce0fe7

Please sign in to comment.