mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
Problem: stream_engine use after free
Solution: Don't allow concurrent heartbeat timers
This commit is contained in:
parent
60cca513a1
commit
13387c5cdc
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user