Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Create the client in the call instead of once globally.

  • Loading branch information...
commit d16da4e23bbd03fc713364604580db46119f30bd 1 parent 8210af9
Eric Florenzano authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/jsonrpc.js
View
6 src/jsonrpc.js
@@ -10,9 +10,9 @@ var JSONRPCClient = function(port, host) {
this.port = port;
this.host = host;
- var client = http.createClient(port, host);
-
this.call = function(method, params, callback, errback, path) {
+ var client = http.createClient(port, host);
+
// First we encode the request into JSON
var requestJSON = JSON.stringify({
'id': '' + (new Date()).getTime(),
@@ -201,4 +201,4 @@ var JSONRPC = {
}
};
-process.mixin(exports, JSONRPC);
+process.mixin(exports, JSONRPC);
Please sign in to comment.
Something went wrong with that request. Please try again.