Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
2b76b620
提交
2b76b620
authored
1月 16, 2019
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix worker 100% CPU usage due to wrong iteration in Router.cpp destructor
上级
d4854d93
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
8 行增加
和
33 行删除
+8
-33
Transport.hpp
worker/include/RTC/Transport.hpp
+0
-3
Router.cpp
worker/src/RTC/Router.cpp
+8
-11
Transport.cpp
worker/src/RTC/Transport.cpp
+0
-13
WebRtcTransport.cpp
worker/src/RTC/WebRtcTransport.cpp
+0
-6
没有找到文件。
worker/include/RTC/Transport.hpp
浏览文件 @
2b76b620
...
...
@@ -68,7 +68,6 @@ namespace RTC
virtual
~
Transport
();
public
:
void
Close
();
virtual
Json
::
Value
ToJson
()
const
=
0
;
virtual
Json
::
Value
GetStats
()
const
=
0
;
void
HandleProducer
(
RTC
::
Producer
*
producer
);
...
...
@@ -129,8 +128,6 @@ namespace RTC
Timer
*
rtcpTimer
{
nullptr
};
RTC
::
UdpSocket
*
mirrorSocket
{
nullptr
};
RTC
::
TransportTuple
*
mirrorTuple
{
nullptr
};
// Others.
bool
closed
{
false
};
// Others (Producers and Consumers).
std
::
unordered_set
<
RTC
::
Producer
*>
producers
;
std
::
unordered_set
<
RTC
::
Consumer
*>
consumers
;
...
...
worker/src/RTC/Router.cpp
浏览文件 @
2b76b620
...
...
@@ -59,9 +59,8 @@ namespace RTC
{
auto
*
transport
=
it
->
second
;
// Do not delete the Transport but call to its Close() method so it will call us
// on OnTransportClosed() and will delete it there.
transport
->
Close
();
it
=
this
->
transports
.
erase
(
it
);
delete
transport
;
}
// Close the audio level timer.
...
...
@@ -595,12 +594,10 @@ namespace RTC
return
;
}
// Do not delete the Transport but call to its Close() method so it will call us
// on OnTransportClosed() and will delete it there.
transport
->
Close
();
MS_DEBUG_DEV
(
"Transport closed [transportId:%"
PRIu32
"]"
,
transport
->
transportId
);
delete
transport
;
request
->
Accept
();
break
;
...
...
@@ -995,10 +992,10 @@ namespace RTC
return
;
}
delete
producer
;
MS_DEBUG_DEV
(
"Producer closed [producerId:%"
PRIu32
"]"
,
producer
->
producerId
);
delete
producer
;
request
->
Accept
();
break
;
...
...
@@ -1167,6 +1164,8 @@ namespace RTC
return
;
}
MS_DEBUG_DEV
(
"Consumer closed [consumerId:%"
PRIu32
"]"
,
consumer
->
consumerId
);
delete
consumer
;
request
->
Accept
();
...
...
@@ -1598,8 +1597,6 @@ namespace RTC
MS_TRACE
();
this
->
transports
.
erase
(
transport
->
transportId
);
delete
transport
;
}
void
Router
::
OnProducerClosed
(
RTC
::
Producer
*
producer
)
...
...
worker/src/RTC/Transport.cpp
浏览文件 @
2b76b620
...
...
@@ -34,19 +34,6 @@ namespace RTC
{
MS_TRACE
();
if
(
!
this
->
closed
)
Close
();
}
void
Transport
::
Close
()
{
MS_TRACE
();
if
(
this
->
closed
)
return
;
this
->
closed
=
true
;
// Close all the handled Producers.
for
(
auto
it
=
this
->
producers
.
begin
();
it
!=
this
->
producers
.
end
();)
{
...
...
worker/src/RTC/WebRtcTransport.cpp
浏览文件 @
2b76b620
...
...
@@ -1181,9 +1181,6 @@ namespace RTC
// Notify.
eventData
[
JsonStringDtlsState
]
=
JsonStringFailed
;
this
->
notifier
->
Emit
(
this
->
transportId
,
"dtlsstatechange"
,
eventData
);
// This is a fatal error so close the transport.
Close
();
}
void
WebRtcTransport
::
OnDtlsClosed
(
const
RTC
::
DtlsTransport
*
/*dtlsTransport*/
)
...
...
@@ -1200,9 +1197,6 @@ namespace RTC
// Notify.
eventData
[
JsonStringDtlsState
]
=
JsonStringClosed
;
this
->
notifier
->
Emit
(
this
->
transportId
,
"dtlsstatechange"
,
eventData
);
// This is a fatal error so close the transport.
Close
();
}
void
WebRtcTransport
::
OnOutgoingDtlsData
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论