Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process hangs and won't exit correctly when sending incorrect message from DEALER->REP #239

Closed
Madd0g opened this issue Mar 19, 2018 · 2 comments

Comments

@Madd0g
Copy link

Madd0g commented Mar 19, 2018

I have the same DEALER code sending messages to REP/ROUTER, the only difference that sending to REP requires an extra .send() in front of the actual message.

let socket = zmq.socket('dealer');
socket.bindSync('tcp://127.0.0.1:5555');
....
if (isRep) {
    socket.send('', zmq.ZMQ_SNDMORE);
}
socket.send(envelope);

Right now if I forget to pass isRep the message is not received, but the process also hangs after CTRL+C and I have to kill it with kill -9.

Anything I can do to catch this error and prevent it? This seems like such an easy mistake to make, I keep forgetting to pass the isRep.

Thanks

@rolftimmermans
Copy link
Member

Recently we have released 6.0 beta. It features a new API that addresses some fundamental issues with the previous API and also addresses a number of stability bugs. To make upgrading easier it includes a compatibility layer with versions 4.x/5.x. It would be great if you could give the latest version a spin to see if this solves this particular issue. If you run into any problems with it, feel free to report it here or in a new issue.

@aminya
Copy link
Member

aminya commented Aug 13, 2024

v6 was released. Please try again with the latest version, and report back if the issue still persists.
https://github.com/zeromq/zeromq.js/releases/tag/v6.0.0

@aminya aminya added the wontfix label Sep 16, 2024
@aminya aminya closed this as completed Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants