Skip to content

Commit

Permalink
Exporter: Filter normal read and write errors.(ossrs#3364)
Browse files Browse the repository at this point in the history
  • Loading branch information
chundonglinlin committed Jan 6, 2023
1 parent a27ce1d commit e93abb6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion trunk/src/app/srs_app_statistic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,10 @@ 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_++;
}

Expand Down

0 comments on commit e93abb6

Please sign in to comment.