Publisher crashes after re-connect to subscriber in a LAN
Opened this issue · 3 comments
I'm a beginner about the zmq and interested to use it in my project.
I'm trying to create a simple pub/sub sample programs and run the subscriber program in other computer in a LAN.
I pulled the network cable in a pubhisher computer and then re-connect it again after several seconds
and then find a crash in my publisher. I don't get any .NET exception so presumably it was from internal zmq native library.
The problem happens either I pulled the network cable in the publisher computer or subscriber computer.
Is there any resolution for this problem? or I might miss the zmq settings in my code?
Many thanks
Hi, just to clarify a few things:
- What version of clrzmq are you using? The latest stable one on NuGet is 2.2.2.
- What happens when it crashes? Is there a stack trace you can send, or an assertion message or anything?
- When you unplug the cable on the subscriber, does the subscriber crash?
- What socket options, if any, have you set on the publisher or subscriber?
- I just downloaded the zip version from code repository which is zeromq-clrzmq-v3.0.0-alpha1-10-gc913100.zip. So it would be 3.0.0-alpha1 version for clrzmq.
- No stack trace that I can catch. It just said that vshost32.exe has stopped working.
- Both publisher and subscriber does not crash when I unplug the cable but only publisher crashes when I plug it back. I think it happens when subscriber is trying to re-connect to publisher.
- I'm trying to send a file in 256 bytes each chunk.
Here is publisher settings:And the subscriber settings:pub.SendHighWatermark = 1000; pub.SendBufferSize = 256; pub.Bind("tcp://*:8988");
Thanks for your response.socket.ReceiveHighWatermark = 1000; socket.ReceiveBufferSize = 256; socket.ReconnectInterval = new TimeSpan(0, 0, 1); socket.Connect("tcp://10.32.7.111:8988"); socket.SubscribeAll();
Have you tried running it standalone, to eliminate Visual Studio and vshost32.exe from the problem?