zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.62k stars 2.35k forks source link

Problem: infinite loop binding a dgram socket if it fails #4509

Closed sphaero closed 1 year ago

sphaero commented 1 year ago

Solution: treat bind errors as a protocol_error instead of connection_error preventing an infinite loop of trying to create the udp socket as through the protocol_error the creation of the socket fails and the engine is terminated

Up for discussion, should we preserve the errno var like done with tcp sockets?

https://github.com/zeromq/libzmq/blob/a666cb1b409d059e9f844994fe2d9d7b6b7e8f91/src/tcp_listener.cpp#L165-L169

This fixes #4504