mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1657, refine http api disconnect log
This commit is contained in:
parent
74799a31e3
commit
4b082ea96c
6 changed files with 23 additions and 11 deletions
|
@ -1720,11 +1720,20 @@ srs_error_t SrsHttpApi::on_http_message(ISrsHttpMessage* r, SrsHttpResponseWrite
|
|||
return err;
|
||||
}
|
||||
|
||||
void SrsHttpApi::on_conn_done()
|
||||
srs_error_t SrsHttpApi::on_conn_done(srs_error_t r0)
|
||||
{
|
||||
// Because we use manager to manage this object,
|
||||
// not the http connection object, so we must remove it here.
|
||||
manager->remove(this);
|
||||
|
||||
// For HTTP-API timeout, we think it's done successfully,
|
||||
// because there may be no request or response for HTTP-API.
|
||||
if (srs_error_code(r0) == ERROR_SOCKET_TIMEOUT) {
|
||||
srs_freep(r0);
|
||||
return srs_success;
|
||||
}
|
||||
|
||||
return r0;
|
||||
}
|
||||
|
||||
std::string SrsHttpApi::desc()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue