Skip to content

Commit 5c37eb0

Browse files
authored
Merge pull request #3 from oxygens/master
Travis icon
2 parents 011e410 + 3e9e870 commit 5c37eb0

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: node_js
2+
dist: trusty
3+
sudo: false
4+
node_js:
5+
- "7.8"
6+

README.MD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Bidirectional JSON-RPC 2.0 server and client
22

3+
[![Build Status](https://travis-ci.org/oxygens/jsonrpc-bidirectional.svg?branch=master)](https://travis-ci.org/oxygens/jsonrpc-bidirectional)
4+
35
A main goal of this project is to have the JSONRPC server and client support __bidirectional JSON-RPC requests over a single WebSocket connection.__
46

57
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.

src/Plugins/Client/WebSocketTransport.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,19 @@ class WebSocketTransport extends JSONRPC.ClientPluginBase
137137
//console.error(error);
138138
console.log("[" + process.pid + "] Rejecting all Promise instances in WebSockets/JSONRPCClientPlugin.");
139139

140+
let nCount = 0;
141+
140142
for(let nCallID in this._objWebSocketRequestsPromises)
141143
{
142144
this._objWebSocketRequestsPromises[nCallID].fnReject(error);
143145
delete this._objWebSocketRequestsPromises[nCallID];
146+
147+
nCount++;
148+
}
149+
150+
if(nCount)
151+
{
152+
console.error("[" + process.pid + "] Rejected " + nCount + " Promise instances in WebSockets/JSONRPCClientPlugin.");
144153
}
145154
}
146155

0 commit comments

Comments
 (0)