Closed mlequain closed 8 years ago
@mlequain I think I have found a partial solution for your scenario because previously I couldn't define pin at client, and hence I played around with type:'balace' and I had mine fixed.
Try using the code below and and it should work.
client
const seneca = require('seneca')().use('balance-client');
seneca.client({ type: 'balance', pin: 'role:math'});
seneca.client({ pin: 'role:math', port: 22000});
seneca.client({ pin: 'role:math', port: 22001});
for(var i = 0; i < 10; i++){
seneca.act({role: 'math', cmd: 'add', x: 1}, console.log);
}
server
const seneca = require('seneca')();
seneca.listen({port: () => process.argv[2]});
seneca.add({role: 'math', cmd: 'add'}, (msg, done) => done(null, {a: 1, x: msg.x}));
@nicholaschantcs Thanks a lot :) I'll try it asap
@mlequain is this still an issue? Please check against latest as pin handling has been refined. In general, it's best to use the same pin on the client and server
@rjrodger That's my bad, it's now working as intended and i've forgotten to comment on it.
awesome!
The send_done function used by the hook_client isn't able to recognize the act pattern and cannot interact/use the clients initialized with a specific pin.
client
server