mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Merge 6c1aeb1809
into 13597d1b7f
This commit is contained in:
commit
5da92780fe
2 changed files with 10 additions and 2 deletions
|
@ -643,7 +643,13 @@ srs_error_t SrsGoApiRtcWhip::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessa
|
|||
|
||||
SrsRtcUserConfig ruc;
|
||||
if ((err = do_serve_http(w, r, &ruc)) != srs_success) {
|
||||
return srs_error_wrap(err, "serve");
|
||||
if (srs_error_code(err) == ERROR_RTC_SDP_EXCHANGE) {
|
||||
srs_warn("RTC error %s", srs_error_desc(err).c_str());
|
||||
srs_freep(err);
|
||||
return srs_api_response_code(w, r, SRS_CONSTS_HTTP_BadRequest);
|
||||
} else {
|
||||
return srs_error_wrap(err, "serve");
|
||||
}
|
||||
}
|
||||
if (ruc.local_sdp_str_.empty()) {
|
||||
return srs_go_http_error(w, SRS_CONSTS_HTTP_InternalServerError);
|
||||
|
|
|
@ -790,7 +790,9 @@ srs_error_t SrsHttpServeMux::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessa
|
|||
|
||||
srs_assert(h);
|
||||
if ((err = h->serve_http(w, r)) != srs_success) {
|
||||
return srs_error_wrap(err, "serve http");
|
||||
srs_error("serve_http %s", srs_error_desc(err).c_str());
|
||||
srs_freep(err);
|
||||
return srs_go_http_error(w, SRS_CONSTS_HTTP_InternalServerError);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue