Files
ZLMediaKit/server
yingxiaodong 2faa04da30 bug-fix: rtpserver死锁 (#4421)
1、RtpServer对应的socket在读取数据后,会加锁后进行数据处理
  a) LOCK_GUARD(_mtx_event);
  b) _on_multi_read
当_on_multi_read处理中出现问题,会通过回调,调用 s_rtp_server.erase(key); ,
这里锁的调用顺序为:_mtx_event -> s_rtp_server._mtx
2、当外部调用api关闭RtpServer时,会先调用 s_rtp_server.erase(key);
,释放RtpServer对象时,会调用Socket的 setOnRead(nullptr),这里会调用Socket的 _mtx_event。
这里的锁调用顺序为:s_rtp_server._mtx -> _mtx_event
以上两种情况,存在 交叉调用两把锁的问题,会出现死锁。
2025-09-01 11:35:50 +08:00
..
2025-05-31 11:26:00 +08:00
2025-08-23 11:54:58 +08:00
2023-12-09 16:23:51 +08:00
2025-08-23 11:54:58 +08:00
2025-05-31 11:26:00 +08:00
2023-12-09 16:23:51 +08:00
2025-09-01 11:35:50 +08:00