Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-12-11 10:30:13 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5660e2495364ea018492d292021644b9f240bdf5
5660e249
1 parent
2830ee12
fast stop server.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
8 行增加
和
14 行删除
trunk/src/app/srs_app_listener.cpp
trunk/src/app/srs_app_server.cpp
trunk/src/app/srs_app_listener.cpp
查看文件 @
5660e24
...
...
@@ -270,7 +270,9 @@ int SrsTcpListener::cycle()
if
(
client_stfd
==
NULL
){
// ignore error.
srs_error
(
"ignore accept thread stoppped for accept client error"
);
if
(
errno
!=
EINTR
)
{
srs_error
(
"ignore accept thread stoppped for accept client error"
);
}
return
ret
;
}
srs_verbose
(
"get a client. fd=%d"
,
st_netfd_fileno
(
client_stfd
));
...
...
trunk/src/app/srs_app_server.cpp
查看文件 @
5660e24
...
...
@@ -553,22 +553,13 @@ void SrsServer::dispose()
close_listeners
(
SrsListenerRtsp
);
close_listeners
(
SrsListenerFlv
);
#ifdef SRS_AUTO_INGEST
ingester
->
dispose
();
#endif
// @remark don't dispose ingesters, for too slow.
// dispose the source for hls and dvr.
SrsSource
::
dispose_all
();
while
(
!
conns
.
empty
())
{
std
::
vector
<
SrsConnection
*>::
iterator
it
;
for
(
it
=
conns
.
begin
();
it
!=
conns
.
end
();
++
it
)
{
SrsConnection
*
conn
=
*
it
;
conn
->
dispose
();
}
st_usleep
(
100
*
1000
);
}
// @remark don't dispose all connections, for too slow.
#ifdef SRS_AUTO_MEM_WATCH
srs_memory_report
();
#endif
...
...
@@ -871,6 +862,7 @@ int SrsServer::cycle()
st_usleep
(
3
*
1000
*
1000
);
srs_warn
(
"system quit"
);
#else
// normally quit with neccessary cleanup by dispose().
srs_warn
(
"main cycle terminated, system quit normally."
);
dispose
();
srs_trace
(
"srs terminated"
);
...
...
请
注册
或
登录
后发表评论