Skip to content

Commit

Permalink
Merge pull request #3560 from minrk/longcell
Browse files Browse the repository at this point in the history
Remove max_msg_size

The max_msg_size safety limit is just removed.

closes #3124
  • Loading branch information
minrk committed Jul 9, 2013
2 parents b3654c5 + f0faf56 commit ced013f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
6 changes: 0 additions & 6 deletions IPython/html/notebookapp.py
Expand Up @@ -174,7 +174,6 @@ def init_settings(self, ipython_app, kernel_manager, notebook_manager,

# IPython stuff
mathjax_url=ipython_app.mathjax_url,
max_msg_size=ipython_app.max_msg_size,
config=ipython_app.config,
use_less=ipython_app.use_less,
jinja2_env=Environment(loader=FileSystemLoader(template_path)),
Expand Down Expand Up @@ -295,11 +294,6 @@ class NotebookApp(BaseIPythonApplication):

kernel_argv = List(Unicode)

max_msg_size = Integer(65536, config=True, help="""
The max raw message size accepted from the browser
over a WebSocket connection.
""")

def _log_level_default(self):
return logging.INFO

Expand Down
9 changes: 2 additions & 7 deletions IPython/html/services/kernels/handlers.py
Expand Up @@ -79,10 +79,6 @@ def post(self, kernel_id, action):

class ZMQChannelHandler(AuthenticatedZMQStreamHandler):

@property
def max_msg_size(self):
return self.settings.get('max_msg_size', 65535)

def create_stream(self):
km = self.kernel_manager
meth = getattr(km, 'connect_%s' % self.channel)
Expand All @@ -109,9 +105,8 @@ def on_first_message(self, msg):
self.zmq_stream.on_recv(self._on_zmq_reply)

def on_message(self, msg):
if len(msg) < self.max_msg_size:
msg = jsonapi.loads(msg)
self.session.send(self.zmq_stream, msg)
msg = jsonapi.loads(msg)
self.session.send(self.zmq_stream, msg)

def on_close(self):
# This method can be called twice, once by self.kernel_died and once
Expand Down

0 comments on commit ced013f

Please sign in to comment.