mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
srt avoid ack time map memory not release
This commit is contained in:
parent
a74a9ec0d7
commit
02aad5d256
@ -473,6 +473,18 @@ void SrtTransport::handleACKACK(uint8_t *buf, int len, struct sockaddr_storage *
|
||||
}
|
||||
}
|
||||
|
||||
if(_ack_send_timestamp.size()>1000){
|
||||
// clear data
|
||||
for(auto it = _ack_send_timestamp.begin(); it != _ack_send_timestamp.end();){
|
||||
if(DurationCountMicroseconds(_now-it->second)>5e6){
|
||||
// 超过五秒没有ackack 丢弃
|
||||
it = _ack_send_timestamp.erase(it);
|
||||
}else{
|
||||
it++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user