mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
API: Always stat client event if auth fail. v4.0.183
This commit is contained in:
parent
31693d4b61
commit
592d4964ef
3 changed files with 16 additions and 9 deletions
|
@ -8,6 +8,7 @@ The changelog for SRS.
|
||||||
|
|
||||||
## SRS 4.0 Changelog
|
## SRS 4.0 Changelog
|
||||||
|
|
||||||
|
* v4.0, 2021-10-22, Merge [#2687](https://github.com/ossrs/srs/pull/2687): API: Always stat client event if auth fail. v4.0.183
|
||||||
* v4.0, 2021-10-20, Merge [#1758](https://github.com/ossrs/srs/pull/1758): JSON: Support escape special chars. v4.0.182
|
* v4.0, 2021-10-20, Merge [#1758](https://github.com/ossrs/srs/pull/1758): JSON: Support escape special chars. v4.0.182
|
||||||
* v4.0, 2021-10-19, Merge [#1754](https://github.com/ossrs/srs/pull/1754): RTMP: If port is explicity set to 0, use default 1935. v4.0.181
|
* v4.0, 2021-10-19, Merge [#1754](https://github.com/ossrs/srs/pull/1754): RTMP: If port is explicity set to 0, use default 1935. v4.0.181
|
||||||
* v4.0, 2021-10-18, Merge [#2670](https://github.com/ossrs/srs/pull/2670): SRT: Solve mpegts demux assert bug. v4.0.180
|
* v4.0, 2021-10-18, Merge [#2670](https://github.com/ossrs/srs/pull/2670): SRT: Solve mpegts demux assert bug. v4.0.180
|
||||||
|
|
|
@ -514,12 +514,6 @@ srs_error_t SrsRtmpConn::stream_service_cycle()
|
||||||
}
|
}
|
||||||
srs_assert(source != NULL);
|
srs_assert(source != NULL);
|
||||||
|
|
||||||
// update the statistic when source disconveried.
|
|
||||||
SrsStatistic* stat = SrsStatistic::instance();
|
|
||||||
if ((err = stat->on_client(_srs_context->get_id().c_str(), req, this, info->type)) != srs_success) {
|
|
||||||
return srs_error_wrap(err, "rtmp: stat client");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool enabled_cache = _srs_config->get_gop_cache(req->vhost);
|
bool enabled_cache = _srs_config->get_gop_cache(req->vhost);
|
||||||
srs_trace("source url=%s, ip=%s, cache=%d, is_edge=%d, source_id=%s/%s",
|
srs_trace("source url=%s, ip=%s, cache=%d, is_edge=%d, source_id=%s/%s",
|
||||||
req->get_stream_url().c_str(), ip.c_str(), enabled_cache, info->edge, source->source_id().c_str(), source->pre_source_id().c_str());
|
req->get_stream_url().c_str(), ip.c_str(), enabled_cache, info->edge, source->source_id().c_str(), source->pre_source_id().c_str());
|
||||||
|
@ -698,6 +692,12 @@ srs_error_t SrsRtmpConn::do_playing(SrsLiveSource* source, SrsLiveConsumer* cons
|
||||||
srs_assert(req);
|
srs_assert(req);
|
||||||
srs_assert(consumer);
|
srs_assert(consumer);
|
||||||
|
|
||||||
|
// update the statistic when source disconveried.
|
||||||
|
SrsStatistic* stat = SrsStatistic::instance();
|
||||||
|
if ((err = stat->on_client(_srs_context->get_id().c_str(), req, this, info->type)) != srs_success) {
|
||||||
|
return srs_error_wrap(err, "rtmp: stat client");
|
||||||
|
}
|
||||||
|
|
||||||
// initialize other components
|
// initialize other components
|
||||||
SrsPithyPrint* pprint = SrsPithyPrint::create_rtmp_play();
|
SrsPithyPrint* pprint = SrsPithyPrint::create_rtmp_play();
|
||||||
SrsAutoFree(SrsPithyPrint, pprint);
|
SrsAutoFree(SrsPithyPrint, pprint);
|
||||||
|
@ -862,6 +862,12 @@ srs_error_t SrsRtmpConn::do_publishing(SrsLiveSource* source, SrsPublishRecvThre
|
||||||
SrsPithyPrint* pprint = SrsPithyPrint::create_rtmp_publish();
|
SrsPithyPrint* pprint = SrsPithyPrint::create_rtmp_publish();
|
||||||
SrsAutoFree(SrsPithyPrint, pprint);
|
SrsAutoFree(SrsPithyPrint, pprint);
|
||||||
|
|
||||||
|
// update the statistic when source disconveried.
|
||||||
|
SrsStatistic* stat = SrsStatistic::instance();
|
||||||
|
if ((err = stat->on_client(_srs_context->get_id().c_str(), req, this, info->type)) != srs_success) {
|
||||||
|
return srs_error_wrap(err, "rtmp: stat client");
|
||||||
|
}
|
||||||
|
|
||||||
// start isolate recv thread.
|
// start isolate recv thread.
|
||||||
// TODO: FIXME: Pass the callback here.
|
// TODO: FIXME: Pass the callback here.
|
||||||
if ((err = rtrd->start()) != srs_success) {
|
if ((err = rtrd->start()) != srs_success) {
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
|
|
||||||
#define VERSION_MAJOR 4
|
#define VERSION_MAJOR 4
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 182
|
#define VERSION_REVISION 183
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue