modifié: superTornado.py

This commit is contained in:
sidya82 2014-02-28 07:33:43 +01:00
parent a2cd562f89
commit 18ea1de564

View File

@ -105,7 +105,8 @@ class WSocketHandler(tornado.websocket.WebSocketHandler):
data = f.read() data = f.read()
encoded = base64.b64encode(data) encoded = base64.b64encode(data)
self.write_message(encoded) self.write_message(encoded)
except tornado.websocket.WebSocketClosedError: except tornado.websocket.WebSocketClosedError,e:
print e
break break
time.sleep(2) time.sleep(2)
@ -114,7 +115,7 @@ class WSocketHandler(tornado.websocket.WebSocketHandler):
def on_close(self): def on_close(self):
print "->Websocket closed" print "->Websocket closed"
#self.redirect("/") self.redirect("/")