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.
This commit is contained in:
githejie 2024-08-09 15:05:36 +08:00
parent aa77c03a37
commit ce17349f8b

View File

@ -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);