mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine the http request parse. edge retry timeout.
This commit is contained in:
parent
190db75835
commit
96a4428bdb
3 changed files with 19 additions and 1 deletions
11
trunk/src/app/srs_app_edge.cpp
Executable file → Normal file
11
trunk/src/app/srs_app_edge.cpp
Executable file → Normal file
|
@ -144,6 +144,11 @@ void SrsEdgeRtmpUpstream::close()
|
|||
sdk->close();
|
||||
}
|
||||
|
||||
void SrsEdgeRtmpUpstream::set_recv_timeout(int64_t timeout)
|
||||
{
|
||||
sdk->set_recv_timeout(timeout);
|
||||
}
|
||||
|
||||
void SrsEdgeRtmpUpstream::kbps_sample(const char* label, int64_t age)
|
||||
{
|
||||
sdk->kbps_sample(label, age);
|
||||
|
@ -161,7 +166,7 @@ SrsEdgeIngester::SrsEdgeIngester()
|
|||
}
|
||||
|
||||
SrsEdgeIngester::~SrsEdgeIngester()
|
||||
{
|
||||
{
|
||||
stop();
|
||||
|
||||
srs_freep(upstream);
|
||||
|
@ -238,6 +243,9 @@ int SrsEdgeIngester::ingest()
|
|||
SrsPithyPrint* pprint = SrsPithyPrint::create_edge();
|
||||
SrsAutoFree(SrsPithyPrint, pprint);
|
||||
|
||||
// set to larger timeout to read av data from origin.
|
||||
upstream->set_recv_timeout(SRS_EDGE_INGESTER_TIMEOUT_US);
|
||||
|
||||
while (!pthread->interrupted()) {
|
||||
pprint->elapse();
|
||||
|
||||
|
@ -409,6 +417,7 @@ void SrsEdgeForwarder::stop()
|
|||
}
|
||||
|
||||
#define SYS_MAX_EDGE_SEND_MSGS 128
|
||||
|
||||
int SrsEdgeForwarder::cycle()
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue