Switch from gevent-websocket to gevent-ws (#2439)

* Switch from gevent-websocket to gevent-ws

* Return error handling, add gevent_ws source to lib
This commit is contained in:
Ivanq 2020-02-28 03:20:04 +03:00 committed by GitHub
parent 2862587c15
commit 219b90668f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 268 additions and 24 deletions

View file

@ -814,7 +814,7 @@ class UiRequest(object):
# Remove websocket from every site (admin sites allowed to join other sites event channels)
if ui_websocket in site_check.websockets:
site_check.websockets.remove(ui_websocket)
return "Bye."
return [b"Bye."]
else: # No site found by wrapper key
ws.send(json.dumps({"error": "Wrapper key not found: %s" % wrapper_key}))
return self.error403("Wrapper key not found: %s" % wrapper_key)