-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Multiple binds on DGRAM socket #4434
Comments
Netstat also only shows it's listening on port 1511
|
probably related: #4342 |
Just after Line 738 in 875c2b1
in socket_base.cpp the second udp socket is created
However a few steps further in execution it is gone again. It's gone once zmq_recv is called in the socket. But not sure whether that's related as it is probably an async operation in a background thread that handles the socket |
Still tracing this. After creation of the second socket (second bind) I can see a socket is being created. (fd=10, first bind fd=9). However after creation I also see term command (pipe_term_ack) happening which calls the destructor of the udp_engine_t instance. So the socket gets destroyed again. |
I'm receiving an Line 91 in acfdf67
Which results in reading a 'delimiter' on the pipe which triggers the destruction (level 2): Line 511 in ce6d48c
Order of commands handled internally are:
|
As a reference when I change to TCP using a sub socket I get only the following commands:
Then it runs just fine |
Ok, it's a feature as the destroy is initiated here: Lines 60 to 66 in ce6d48c
Which clearly says:
So instead of this being a bug it might be a feature request. Question then is whether this limitations serves a purpose or not? |
Issue description
Multiple binds on a DGRAM socket only work for the first bind
Environment
Minimal test code / Steps to reproduce the issue
What's the actual result? (include assertion message & call stack if applicable)
There's no error. Just that no data is being received on port 6200
What's the expected result?
Both ports would receive data
The text was updated successfully, but these errors were encountered: