modifié: superTornado.py
This commit is contained in:
parent
a2cd562f89
commit
18ea1de564
@ -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("/")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user