From 23dd86075147f933e74f32d59b351c62b5517875 Mon Sep 17 00:00:00 2001 From: chundonglinlin Date: Sat, 7 Jan 2023 01:49:14 +0800 Subject: [PATCH] Exporter: Filter normal read and write errors.(#3364) --- trunk/src/app/srs_app_statistic.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_statistic.cpp b/trunk/src/app/srs_app_statistic.cpp index 01954b55b41..32366084af9 100644 --- a/trunk/src/app/srs_app_statistic.cpp +++ b/trunk/src/app/srs_app_statistic.cpp @@ -468,7 +468,11 @@ void SrsStatistic::on_disconnect(std::string id, srs_error_t err) stream->nb_clients--; vhost->nb_clients--; - if (srs_error_code(err) != ERROR_SUCCESS) { + // TODO: FIXME: Should filter the err. + int err_code = srs_error_code(err); + if (err_code != ERROR_SUCCESS && err_code != ERROR_SOCKET_READ && err_code != ERROR_SOCKET_WRITE + && err_code != ERROR_SRT_IO) + { nb_errs_++; }