Removing select_subptotocol as it breaks in tornado 5+; Include nano

This commit is contained in:
James Barnsley
2019-10-13 10:51:12 +13:00
parent 0c55665fd6
commit 103bcd5ba4
2 changed files with 3 additions and 14 deletions

View File

@ -16,20 +16,6 @@ class WebsocketHandler(tornado.websocket.WebSocketHandler):
def check_origin(self, origin):
return True
def select_subprotocol(self, subprotocols):
# select one of our subprotocol elements and return it. This confirms the connection has been accepted.
protocols = mem.iris.digest_protocol(subprotocols)
# if we've auto-generated some ids, the provided subprotocols was a string, so just return it right back
# this allows a connection to be completed
if protocols['generated']:
return subprotocols[0]
# otherwise, just return one of the supplied subprotocols
else:
return protocols['client_id']
def open(self):