[zeromq-dev] ZMQ Crash from unknown DNS name

Martin Sustrik sustrik at 250bpm.com
Thu Jan 27 09:55:20 CET 2011

On 01/27/2011 09:51 AM, David Kantowitz wrote:

> Is it really that bad to parse and process the transport URL twice?
>     1. I'd guess (but I'm not sure) most applications don't call
> connect() very often.
>     2. The bind library probably cached the name lookup.

The problem is what to do if the first URL resolution (in app thread) 
succeeded and the second one (in the I/O thread) failed.

I think the names should be resolved before zmq_connect() exits to 
prevent the above.

> It almost seems simpler to use the URL as the internal endpoint instead
> of making a new address structure.  Maybe the thing to do is re-write
> the URL replacing the DNS name with the resolved IP address before
> passing it onto the i/o thread.

Yes. That's an option.


More information about the zeromq-dev mailing list