Problem: stream_engine use after free

Solution: Don't allow concurrent heartbeat timers
This commit is contained in:
Mancaș George 2019-07-24 13:04:32 +00:00
parent 60cca513a1
commit 13387c5cdc

View File

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