Skip to content

Commit

Permalink
Problem: tests reconnect_stop_after_disconnect failed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
githejie committed Aug 9, 2024
1 parent aa77c03 commit ce17349
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/socket_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ce17349

Please sign in to comment.