Show More
@@ -214,6 +214,10 b' class ZMQChannelsHandler(AuthenticatedZMQStreamHandler):' | |||
|
214 | 214 | stream.on_recv_stream(self._on_zmq_reply) |
|
215 | 215 | |
|
216 | 216 | def on_message(self, msg): |
|
217 | if not self.channels: | |
|
218 | # already closed, ignore the message | |
|
219 | self.log.debug("Received message on closed websocket %r", msg) | |
|
220 | return | |
|
217 | 221 | if isinstance(msg, bytes): |
|
218 | 222 | msg = deserialize_binary_message(msg) |
|
219 | 223 | else: |
@@ -222,6 +226,9 b' class ZMQChannelsHandler(AuthenticatedZMQStreamHandler):' | |||
|
222 | 226 | if channel is None: |
|
223 | 227 | self.log.warn("No channel specified, assuming shell: %s", msg) |
|
224 | 228 | channel = 'shell' |
|
229 | if channel not in self.channels: | |
|
230 | self.log.warn("No such channel: %r", channel) | |
|
231 | return | |
|
225 | 232 | stream = self.channels[channel] |
|
226 | 233 | self.session.send(stream, msg) |
|
227 | 234 |
General Comments 0
You need to be logged in to leave comments.
Login now