1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for bug #237, when recv thread failed, quit the cycle. 2.0.44

This commit is contained in:
winlin 2014-12-02 15:21:08 +08:00
parent b28dc7364e
commit 757cffbabf
4 changed files with 48 additions and 9 deletions

View file

@ -558,13 +558,21 @@ int SrsRtmpConn::do_playing(SrsSource* source, SrsQueueRecvThread* trd)
srs_verbose("pump client message to process.");
if ((ret = process_play_control_msg(consumer, msg)) != ERROR_SUCCESS) {
if (!srs_is_system_control_error(ret)) {
if (!srs_is_system_control_error(ret) && !srs_is_client_gracefully_close(ret)) {
srs_error("process play control message failed. ret=%d", ret);
}
return ret;
}
}
// quit when recv thread error.
if ((ret = trd->error_code()) != ERROR_SUCCESS) {
if (!srs_is_client_gracefully_close(ret)) {
srs_error("recv thread failed. ret=%d", ret);
}
return ret;
}
// collect elapse for pithy print.
pithy_print.elapse();
@ -744,6 +752,9 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
// check the thread error code.
if ((ret = trd->error_code()) != ERROR_SUCCESS) {
if (!srs_is_client_gracefully_close(ret)) {
srs_error("recv thread failed. ret=%d", ret);
}
return ret;
}
}