mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine error log for rtmp2rtc. (#2728). v4.0.215
This commit is contained in:
parent
add4ff38ec
commit
8bc2759c7e
4 changed files with 11 additions and 2 deletions
|
@ -185,6 +185,14 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe
|
|||
server_enabled, rtc_enabled, ruc.req_->vhost.c_str());
|
||||
}
|
||||
|
||||
// For RTMP to RTC, fail if disabled and RTMP is active, see https://github.com/ossrs/srs/issues/2728
|
||||
if (!_srs_config->get_rtc_to_rtmp(ruc.req_->vhost)) {
|
||||
SrsLiveSource* rtmp = _srs_sources->fetch(ruc.req_);
|
||||
if (!rtmp->inactive()) {
|
||||
return srs_error_new(ERROR_RTC_DISABLED, "Disabled rtmp_to_rtc of %s, see #2728", ruc.req_->vhost.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: FIXME: When server enabled, but vhost disabled, should report error.
|
||||
SrsRtcConnection* session = NULL;
|
||||
if ((err = server_->create_session(&ruc, local_sdp, &session)) != srs_success) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue