modifié: superTornado.py
This commit is contained in:
parent
033a7dce2b
commit
d0cf1fbbd3
@ -97,7 +97,6 @@ class WSocketHandler(tornado.websocket.WebSocketHandler):
|
|||||||
def open(self) :
|
def open(self) :
|
||||||
if not self.current_user :
|
if not self.current_user :
|
||||||
self.close()
|
self.close()
|
||||||
self.redirect("/")
|
|
||||||
return
|
return
|
||||||
print "->Websocket opened"
|
print "->Websocket opened"
|
||||||
while 1 :
|
while 1 :
|
||||||
@ -115,6 +114,7 @@ class WSocketHandler(tornado.websocket.WebSocketHandler):
|
|||||||
|
|
||||||
def on_close(self):
|
def on_close(self):
|
||||||
print "->Websocket closed"
|
print "->Websocket closed"
|
||||||
|
self.redirect("/")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user