正在显示
1 个修改的文件
包含
7 行增加
和
3 行删除
| @@ -385,7 +385,8 @@ void SrsServer::destroy() | @@ -385,7 +385,8 @@ void SrsServer::destroy() | ||
| 385 | srs_freep(signal_manager); | 385 | srs_freep(signal_manager); |
| 386 | srs_freep(kbps); | 386 | srs_freep(kbps); |
| 387 | 387 | ||
| 388 | - for (std::vector<SrsConnection*>::iterator it = conns.begin(); it != conns.end();) { | 388 | + // never destroy the connections, for it's still alive. |
| 389 | + /*for (std::vector<SrsConnection*>::iterator it = conns.begin(); it != conns.end();) { | ||
| 389 | SrsConnection* conn = *it; | 390 | SrsConnection* conn = *it; |
| 390 | 391 | ||
| 391 | // remove the connection, then free it, | 392 | // remove the connection, then free it, |
| @@ -395,9 +396,12 @@ void SrsServer::destroy() | @@ -395,9 +396,12 @@ void SrsServer::destroy() | ||
| 395 | 396 | ||
| 396 | srs_freep(conn); | 397 | srs_freep(conn); |
| 397 | } | 398 | } |
| 398 | - conns.clear(); | 399 | + conns.clear();*/ |
| 399 | 400 | ||
| 400 | - SrsSource::destroy(); | 401 | + // never destroy the source, |
| 402 | + // when we free all sources, the fmle publish may retry | ||
| 403 | + // and segment fault. | ||
| 404 | + //SrsSource::destroy(); | ||
| 401 | } | 405 | } |
| 402 | 406 | ||
| 403 | int SrsServer::initialize() | 407 | int SrsServer::initialize() |
-
请 注册 或 登录 后发表评论