[zeromq-dev] server with xrep close client's connection automaticly

Chuck Remes lists at chuckremes.com
Tue Sep 18 17:07:24 CEST 2012


On Sep 18, 2012, at 9:57 AM, Zhong Weilin wrote:

> Hi, zmq dev team:
> 
>      I have already pasted the minimal test case to github.com, link is: https://github.com/maigege/zmq_demo, zmq_client is a test case of client, zmq_server is a test case of server. Zmq official doc mentions that client can connect automaticly to the server after it lost connection to server, but in fact it doesn't work, so I add some code to deal with disconnecting. Now in my project,  I hit a problem like that: in the begining a certain amount of clients(about 20) can connect to the server with zmq_xrep ok and can communication normally, but after that client with zmq_req connect to the server with zmq_xrep, the server close the connection automaticly, I check it with a network packet capture tool named wireshark, why this happens ? I'm confused about how server deal with multiple clients' connection?
> I hope you guys help me to check the demo code, I wrap zeromq api, I think it makes it more readable. If you have any good idea to handle the disconnecting, pls let me know, thank you!!! 

That's a lot of code.

I haven't run your code. However, I suspect that you might be reusing ZMQ_IDENTITY values for multiple sockets. Try commenting out the code where you set the socket identity and run your code again.

Also, it would be useful if you included a pastie of the output you see when you run your example.

cr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120918/0dad5399/attachment.htm>


More information about the zeromq-dev mailing list