[DEBUG] chnage direction of arrow in protocol's SEND and RECEIVE logs

They currently feel backwards.
This commit is contained in:
Andrey Lushnikov 2017-07-29 17:43:24 -07:00
parent adf35952fc
commit 72991c16eb

View File

@ -54,7 +54,7 @@ class Connection extends EventEmitter {
send(method, params = {}) { send(method, params = {}) {
let id = ++this._lastId; let id = ++this._lastId;
let message = JSON.stringify({id, method, params}); let message = JSON.stringify({id, method, params});
debug('SEND ' + message); debug('SEND ' + message);
this._ws.send(message); this._ws.send(message);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this._callbacks.set(id, {resolve, reject, method}); this._callbacks.set(id, {resolve, reject, method});
@ -65,7 +65,7 @@ class Connection extends EventEmitter {
* @param {string} message * @param {string} message
*/ */
_onMessage(message) { _onMessage(message) {
debug('RECV ' + message); debug('RECV ' + message);
let object = JSON.parse(message); let object = JSON.parse(message);
if (object.id && this._callbacks.has(object.id)) { if (object.id && this._callbacks.has(object.id)) {
let callback = this._callbacks.get(object.id); let callback = this._callbacks.get(object.id);