mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-13 22:50:19 +02:00
- resolve FPE when ZMQ_RECONNECT_IVL == 0
This commit is contained in:

committed by
Luca Boccassi

parent
d0d23446f5
commit
c7aef56048
@@ -587,7 +587,7 @@ void zmq::session_base_t::reconnect ()
|
|||||||
reset ();
|
reset ();
|
||||||
|
|
||||||
// Reconnect.
|
// Reconnect.
|
||||||
if (options.reconnect_ivl != -1)
|
if (options.reconnect_ivl > 0)
|
||||||
start_connecting (true);
|
start_connecting (true);
|
||||||
else {
|
else {
|
||||||
std::string *ep = new (std::string);
|
std::string *ep = new (std::string);
|
||||||
|
@@ -101,7 +101,7 @@ void zmq::stream_connecter_base_t::process_term (int linger_)
|
|||||||
|
|
||||||
void zmq::stream_connecter_base_t::add_reconnect_timer ()
|
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 ();
|
const int interval = get_new_reconnect_ivl ();
|
||||||
add_timer (interval, reconnect_timer_id);
|
add_timer (interval, reconnect_timer_id);
|
||||||
_socket->event_connect_retried (
|
_socket->event_connect_retried (
|
||||||
|
@@ -179,7 +179,7 @@ void zmq::vmci_connecter_t::start_connecting ()
|
|||||||
|
|
||||||
void zmq::vmci_connecter_t::add_reconnect_timer ()
|
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 ();
|
int rc_ivl = get_new_reconnect_ivl ();
|
||||||
add_timer (rc_ivl, reconnect_timer_id);
|
add_timer (rc_ivl, reconnect_timer_id);
|
||||||
socket->event_connect_retried (
|
socket->event_connect_retried (
|
||||||
|
Reference in New Issue
Block a user