From 7e677bb6b3deb05c4389da2df8600963dbacb9b5 Mon Sep 17 00:00:00 2001 From: githejie Date: Fri, 9 Aug 2024 15:05:36 +0800 Subject: [PATCH] Problem: tests reconnect_stop_after_disconnect failed Solution: this test failed because "_disconnected" is not initialized in constructor, and the behavior of reconnect will not be as designed when "_disconnected" is randomly assigned to true. So we specify it as false in initialize list to solve this problem. --- src/socket_base.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 5a9adcdeea..c76ff98d97 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -228,7 +228,8 @@ zmq::socket_base_t::socket_base_t (ctx_t *parent_, _monitor_events (0), _thread_safe (thread_safe_), _reaper_signaler (NULL), - _monitor_sync () + _monitor_sync (), + _disconnected (false) { options.socket_id = sid_; options.ipv6 = (parent_->get (ZMQ_IPV6) != 0);