##// END OF EJS Templates
Unregister comm if there is an error in publishing the comm open message
Jason Grout -
Show More
@@ -88,11 +88,14 b' class Comm(LoggingConfigurable):'
88 "and a comm_manager attached to that kernel.")
88 "and a comm_manager attached to that kernel.")
89
89
90 comm_manager.register_comm(self)
90 comm_manager.register_comm(self)
91 try:
91 self._publish_msg('comm_open',
92 self._publish_msg('comm_open',
92 data=data, metadata=metadata, buffers=buffers,
93 data=data, metadata=metadata, buffers=buffers,
93 target_name=self.target_name,
94 target_name=self.target_name)
94 )
95 self._closed = False
95 self._closed = False
96 except:
97 comm_manager.unregister_comm(self)
98 raise
96
99
97 def close(self, data=None, metadata=None, buffers=None):
100 def close(self, data=None, metadata=None, buffers=None):
98 """Close the frontend-side version of this comm"""
101 """Close the frontend-side version of this comm"""
General Comments 0
You need to be logged in to leave comments. Login now