Skip to content

Commit ce17349

Browse files
committed
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.
1 parent aa77c03 commit ce17349

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/socket_base.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ zmq::socket_base_t::socket_base_t (ctx_t *parent_,
228228
_monitor_events (0),
229229
_thread_safe (thread_safe_),
230230
_reaper_signaler (NULL),
231-
_monitor_sync ()
231+
_monitor_sync (),
232+
_disconnected (false)
232233
{
233234
options.socket_id = sid_;
234235
options.ipv6 = (parent_->get (ZMQ_IPV6) != 0);

0 commit comments

Comments
 (0)