From 18ea1de564b9a69558346cb7989a56e40d262114 Mon Sep 17 00:00:00 2001 From: sidya82 Date: Fri, 28 Feb 2014 07:33:43 +0100 Subject: [PATCH] =?UTF-8?q?=09modifi=C3=A9:=20=20=20=20=20=20=20=20=20supe?= =?UTF-8?q?rTornado.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- superTornado.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/superTornado.py b/superTornado.py index 69721c8..9c6b02c 100644 --- a/superTornado.py +++ b/superTornado.py @@ -105,7 +105,8 @@ class WSocketHandler(tornado.websocket.WebSocketHandler): data = f.read() encoded = base64.b64encode(data) self.write_message(encoded) - except tornado.websocket.WebSocketClosedError: + except tornado.websocket.WebSocketClosedError,e: + print e break time.sleep(2) @@ -114,7 +115,7 @@ class WSocketHandler(tornado.websocket.WebSocketHandler): def on_close(self): print "->Websocket closed" - #self.redirect("/") + self.redirect("/")