mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine hls notify, support timeout.
This commit is contained in:
parent
d8988da0ea
commit
1f93fb3399
4 changed files with 19 additions and 10 deletions
|
@ -44,6 +44,9 @@ using namespace std;
|
|||
#define SRS_HTTP_HEADER_BUFFER 1024
|
||||
#define SRS_HTTP_BODY_BUFFER 32 * 1024
|
||||
|
||||
// the timeout for hls notify, in us.
|
||||
#define SRS_HLS_NOTIFY_TIMEOUT_US (int64_t)(10*1000*1000LL)
|
||||
|
||||
SrsHttpHooks::SrsHttpHooks()
|
||||
{
|
||||
}
|
||||
|
@ -350,7 +353,7 @@ int SrsHttpHooks::on_hls_notify(std::string url, SrsRequest* req, std::string ts
|
|||
}
|
||||
|
||||
SrsHttpClient http;
|
||||
if ((ret = http.initialize(uri.get_host(), uri.get_port())) != ERROR_SUCCESS) {
|
||||
if ((ret = http.initialize(uri.get_host(), uri.get_port(), SRS_HLS_NOTIFY_TIMEOUT_US)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue