mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
correct the client ip of http-flv player, for statistic (#2491)
This commit is contained in:
parent
ed6f8689b4
commit
f62a4c4893
1 changed files with 3 additions and 0 deletions
|
@ -587,6 +587,9 @@ srs_error_t SrsLiveStream::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess
|
|||
SrsHttpMessage* hr = dynamic_cast<SrsHttpMessage*>(r);
|
||||
SrsHttpConn* hc = dynamic_cast<SrsHttpConn*>(hr->connection());
|
||||
|
||||
// update client ip
|
||||
req->ip = hc->remote_ip();
|
||||
|
||||
// update the statistic when source disconveried.
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
if ((err = stat->on_client(_srs_context->get_id().c_str(), req, hc, SrsRtmpConnPlay)) != srs_success) {
|
||||
|
|
Loading…
Reference in a new issue