##// END OF EJS Templates
unregister and register both take comm as argument
Sylvain Corlay -
Show More
@@ -72,10 +72,10 b' class CommManager(LoggingConfigurable):'
72 72 self.comms[comm_id] = comm
73 73 return comm_id
74 74
75 def unregister_comm(self, comm_id):
75 def unregister_comm(self, comm):
76 76 """Unregister a comm, and close its counterpart"""
77 77 # unlike get_comm, this should raise a KeyError
78 comm = self.comms.pop(comm_id)
78 comm = self.comms.pop(comm.comm_id)
79 79
80 80 def get_comm(self, comm_id):
81 81 """Get a comm with a particular id
@@ -115,7 +115,7 b' class CommManager(LoggingConfigurable):'
115 115 except Exception:
116 116 self.log.error("Exception opening comm with target: %s", target_name, exc_info=True)
117 117 comm.close()
118 self.unregister_comm(comm_id)
118 self.unregister_comm(comm)
119 119
120 120 def comm_msg(self, stream, ident, msg):
121 121 """Handler for comm_msg messages"""
General Comments 0
You need to be logged in to leave comments. Login now