const JSONRPC = require('./jsonrpc');
// const log = require('../util/log');

class JSONRPCWebSocket extends JSONRPC {
    constructor (webSocket) {
        super();

        this._ws = webSocket;
        this._ws.onmessage = e => this._onSocketMessage(e);
        this._ws.onopen = e => this._onSocketOpen(e);
        this._ws.onclose = e => this._onSocketClose(e);
        this._ws.onerror = e => this._onSocketError(e);
    }

    dispose () {
        this._ws.close();
        this._ws = null;
    }

    _onSocketOpen () {
    }

    _onSocketClose () {
    }

    _onSocketError () {
    }

    _onSocketMessage (e) {
        const json = JSON.parse(e.data);
        if (json.method !== 'characteristicDidChange') {
            // log.info(`received message: ${json}`);
        }
        this._handleMessage(json);
    }

    _sendMessage (message) {
        const messageText = JSON.stringify(message);
        this._ws.send(messageText);
    }
}

module.exports = JSONRPCWebSocket;

@@ -662,129 +662,8 @@
 a);%0A
-        if (json.method !== 'characteristicDidChange') %7B%0A            // log.info(%60received message: $%7Bjson%7D%60);%0A        %7D%0A
     

remove logging