Commit 13387c5c authored by Mancaș George's avatar Mancaș George

Problem: stream_engine use after free

Solution: Don't allow concurrent heartbeat timers
parent 60cca513
......@@ -522,7 +522,7 @@ const zmq::endpoint_uri_pair_t &zmq::stream_engine_base_t::get_endpoint () const
void zmq::stream_engine_base_t::mechanism_ready ()
{
if (_options.heartbeat_interval > 0) {
if (_options.heartbeat_interval > 0 && !_has_heartbeat_timer) {
add_timer (_options.heartbeat_interval, heartbeat_ivl_timer_id);
_has_heartbeat_timer = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment