It seems that there is no way to set custom code and reason when closing websocket connection in Python application (WebSocket Connection Close Code and Reason Protocol Spec: https://tools.ietf.org/html/rfc6455#section-7.1.5).
Please add uwsgi.websocket_close(code, reason) to uwsgi API to allow an application to set custom code and reason.
It seems that there is no way to set custom code and reason when closing websocket connection in Python application (WebSocket Connection Close Code and Reason Protocol Spec: https://tools.ietf.org/html/rfc6455#section-7.1.5).
Please add
uwsgi.websocket_close(code, reason)
to uwsgi API to allow an application to set custom code and reason.