From: Ben Darnell Date: Sat, 29 May 2010 00:12:34 +0000 (-0700) Subject: Revert "websockets: continue listening for messages after parsing completion" X-Git-Tag: v1.0.0~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70a377088a2a589cb1433a508fc6ecec3c053c18;p=thirdparty%2Ftornado.git Revert "websockets: continue listening for messages after parsing completion" This reverts commit 9ea5f8a277db96557ae7867375c7db4d8c5f633a. The one-shot behavior of receive_message was intentional, and simply requeuing the old callback every time will eventually overflow the stack due to repeated async_callback wrappers. An alternate interface that doesn't require receive_message to be called for every message may be added in a future change. See discussion at http://github.com/facebook/tornado/commit/9ea5f8a277db96557ae7867375c7db4d8c5f633a --- diff --git a/tornado/websocket.py b/tornado/websocket.py index 11f8b0653..dfca709c4 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -127,7 +127,6 @@ class WebSocketHandler(tornado.web.RequestHandler): def _on_end_delimiter(self, callback, frame): callback(frame[:-1].decode("utf-8", "replace")) - self.receive_message(callback) def _not_supported(self, *args, **kwargs): raise Exception("Method not supported for Web Sockets")