fixed a wrong status code being used when closing a websocket connection