Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ext-hub: WPWrapper remove wpSock parameter

  • Loading branch information...
commit 6c4f7293c9194b4101a9d86bd64e5f6fef813723 1 parent c3ba712
@kaven276 authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/ext_hub.js
View
6 lib/ext_hub.js
@@ -131,10 +131,10 @@ var server = net.createServer(function(oraSock){
* @param {string} desc worker proxy description.
*/
-function WPWrapper(wpSock, id, hostp, maxPendingRpc, desc){
+function WPWrapper(id, hostp, maxPendingRpc, desc){
var wpw = this;
+ var wpSock = this.wpSock = new net.Socket({allowHalfOpen : true});
this.desc = desc;
- this.wpSock = wpSock;
this.hostp = hostp.split(':');
this.id = id;
this.sts = 'close';
@@ -233,7 +233,7 @@ exports.addWorkerProxy = function(slot, addr, desc, maxPendingRpc){
console.warn('The NO.%d slot is already used by %s', wpSocks[slot].desc);
return;
}
- var wpw = new WPWrapper(new net.Socket({allowHalfOpen : true}), slot, addr, maxPendingRpc, desc);
+ var wpw = new WPWrapper(slot, addr, maxPendingRpc, desc);
wpSocks[slot] = wpw;
wpw.connect();
console.log('set NO.%d worker proxy.', slot);

0 comments on commit 6c4f729

Please sign in to comment.
Something went wrong with that request. Please try again.