Skip to content

Commit

Permalink
Merge pull request zeromq#159 from interpretor/merge-upstream
Browse files Browse the repository at this point in the history
Fix multipart messages for xpub/xsub
  • Loading branch information
interpretor authored Jun 24, 2017
2 parents fdd93ec + 0c3b8bd commit 9b891dc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,26 +777,26 @@ function proxy (frontend, backend, capture){
case 'xpub/xsub':
if(capture){

frontend.on('message',function (msg){
backend.send(msg);
frontend.on('message',function (){
backend.send([].slice.call(arguments));
});

backend.on('message',function (msg){
frontend.send(msg);
backend.on('message',function (){
frontend.send([].slice.call(arguments));

//forwarding messages over capture socket
capture.send(msg);
capture.send([].slice.call(arguments));
});

} else {

//no capture socket provided, just forwarding msgs to respective sockets
frontend.on('message',function (msg){
backend.send(msg);
frontend.on('message',function (){
backend.send([].slice.call(arguments));
});

backend.on('message',function (msg){
frontend.send(msg);
backend.on('message',function (){
frontend.send([].slice.call(arguments));
});

}
Expand Down

0 comments on commit 9b891dc

Please sign in to comment.