From b72b2ed80071e7aa3742cc41181b6a361d5bb2ce Mon Sep 17 00:00:00 2001 From: "ionut.stan" Date: Wed, 19 Apr 2017 17:39:33 +0300 Subject: [PATCH 1/4] travis? --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..7c9ee4b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language node_js +dist trusty +sudo false +node_js + - 7.8 + From f2b7c3b0c3785de31493a5757362b51bbd0af8b0 Mon Sep 17 00:00:00 2001 From: "ionut.stan" Date: Wed, 19 Apr 2017 17:42:19 +0300 Subject: [PATCH 2/4] Bad copy paste. --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c9ee4b..770236b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ -language node_js -dist trusty -sudo false -node_js - - 7.8 +language: node_js +dist: trusty +sudo: false +node_js: + - "7.8" From 72d94eceb082698ec2ff50fef0cb4f406ccd36d3 Mon Sep 17 00:00:00 2001 From: "ionut.stan" Date: Wed, 19 Apr 2017 17:58:18 +0300 Subject: [PATCH 3/4] Yay. --- src/Plugins/Client/WebSocketTransport.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Plugins/Client/WebSocketTransport.js b/src/Plugins/Client/WebSocketTransport.js index 8f59c64..f60cc59 100644 --- a/src/Plugins/Client/WebSocketTransport.js +++ b/src/Plugins/Client/WebSocketTransport.js @@ -137,10 +137,19 @@ class WebSocketTransport extends JSONRPC.ClientPluginBase //console.error(error); console.log("[" + process.pid + "] Rejecting all Promise instances in WebSockets/JSONRPCClientPlugin."); + let nCount = 0; + for(let nCallID in this._objWebSocketRequestsPromises) { this._objWebSocketRequestsPromises[nCallID].fnReject(error); delete this._objWebSocketRequestsPromises[nCallID]; + + nCount++; + } + + if(nCount) + { + console.error("[" + process.pid + "] Rejected " + nCount + " Promise instances in WebSockets/JSONRPCClientPlugin."); } } From 3e9e870fa90faeae889492f38049101b2b7254cb Mon Sep 17 00:00:00 2001 From: "ionut.stan" Date: Wed, 19 Apr 2017 18:21:18 +0300 Subject: [PATCH 4/4] Added Travis icon. --- README.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.MD b/README.MD index 0a8ecb7..661c995 100644 --- a/README.MD +++ b/README.MD @@ -1,5 +1,7 @@ # Bidirectional JSON-RPC 2.0 server and client +[![Build Status](https://travis-ci.org/oxygens/jsonrpc-bidirectional.svg?branch=master)](https://travis-ci.org/oxygens/jsonrpc-bidirectional) + A main goal of this project is to have the JSONRPC server and client support __bidirectional JSON-RPC requests over a single WebSocket connection.__ Both the server and client support two __transports, HTTP and WebSocket__ ([websockets/ws](https://github.com/websockets/ws) compatible API), and allow more through plugin extensibility.