- resolve FPE when ZMQ_RECONNECT_IVL == 0

This commit is contained in:
Bill Torpey 2020-06-26 10:32:16 -04:00 committed by Luca Boccassi
parent d0d23446f5
commit c7aef56048
3 changed files with 3 additions and 3 deletions

View File

@ -587,7 +587,7 @@ void zmq::session_base_t::reconnect ()
reset ();
// Reconnect.
if (options.reconnect_ivl != -1)
if (options.reconnect_ivl > 0)
start_connecting (true);
else {
std::string *ep = new (std::string);

View File

@ -101,7 +101,7 @@ void zmq::stream_connecter_base_t::process_term (int linger_)
void zmq::stream_connecter_base_t::add_reconnect_timer ()
{
if (options.reconnect_ivl != -1) {
if (options.reconnect_ivl > 0) {
const int interval = get_new_reconnect_ivl ();
add_timer (interval, reconnect_timer_id);
_socket->event_connect_retried (

View File

@ -179,7 +179,7 @@ void zmq::vmci_connecter_t::start_connecting ()
void zmq::vmci_connecter_t::add_reconnect_timer ()
{
if (options.reconnect_ivl != -1) {
if (options.reconnect_ivl > 0) {
int rc_ivl = get_new_reconnect_ivl ();
add_timer (rc_ivl, reconnect_timer_id);
socket->event_connect_retried (