@OnWebSocketError
    public void onError(Throwable error)
    {
        Log.debug("Error detected; connection: {}, session: {}", wsConnection, wsSession, error);
        try {
            if (isWebSocketOpen()) {
                Log.warn("Attempting to close connection on which an error occurred: {}", wsConnection, error);
                wsConnection.close(new StreamError(StreamError.Condition.internal_server_error), !isWebSocketOpen());
            } else {
                Log.debug("Error detected on websocket that isn't open (any more):", error);
                wsConnection.close(null, !isWebSocketOpen());
            }
        } catch (Exception e) {
            Log.error("Error disconnecting websocket", e);
        } finally {
            wsSession = null;
        }
    }
Controls if clients that do websockets without the required XMPP framing will get their 'stream' element names
replaced, so that they are able to connect.

@see <a href="https://igniterealtime.atlassian.net/browse/OF-2479">OF-2479: Allow Tsung to test with websockets</a>
xmppserver/src/main/java/org/jivesoftware/openfire/websocket/WebSocketClientConnectionHandler.java