From f62a4c48938e3fb254ae6eba47b9d20dd2d57693 Mon Sep 17 00:00:00 2001 From: Haibo Chen Date: Mon, 26 Jul 2021 20:01:29 +0800 Subject: [PATCH] correct the client ip of http-flv player, for statistic (#2491) --- trunk/src/app/srs_app_http_stream.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trunk/src/app/srs_app_http_stream.cpp b/trunk/src/app/srs_app_http_stream.cpp index 879902c52..231684942 100755 --- a/trunk/src/app/srs_app_http_stream.cpp +++ b/trunk/src/app/srs_app_http_stream.cpp @@ -587,6 +587,9 @@ srs_error_t SrsLiveStream::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMess SrsHttpMessage* hr = dynamic_cast(r); SrsHttpConn* hc = dynamic_cast(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) {