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

For #1638, #307, http api success with message, timeout as such

This commit is contained in:
winlin 2020-03-17 11:40:05 +08:00
parent b5dd502103
commit 6118ca382a
4 changed files with 41 additions and 4 deletions

View file

@ -1431,6 +1431,11 @@ srs_error_t SrsHttpApi::do_cycle()
// get a http message
if ((err = parser->parse_message(skt, &req)) != srs_success) {
// For HTTP timeout, we think it's ok.
if (srs_error_code(err) == ERROR_SOCKET_TIMEOUT) {
srs_freep(err);
return srs_error_wrap(srs_success, "http api timeout");
}
return srs_error_wrap(err, "parse message");
}