From 59b9fa96105139d05ddeedadac34a16d81a341a3 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 6 Apr 2020 19:42:37 +0800 Subject: [PATCH] For #307, always 1 if os does not support sendmmsg --- trunk/conf/full.conf | 2 +- trunk/src/app/srs_app_config.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index 489939a52..b4c6bdd92 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -404,7 +404,7 @@ rtc_server { # default: on ecdsa on; # The max UDP messages send by sendmmsg. - # @remark No effect if OS does not support sendmmsg, like OSX. + # @remark Always 1 if OS does not support sendmmsg, like OSX. # default: 256 sendmmsg 256; } diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 010cbcaaa..b1df5deff 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -4659,10 +4659,9 @@ bool SrsConfig::get_rtc_server_ecdsa() int SrsConfig::get_rtc_server_sendmmsg() { #if !defined(SRS_AUTO_HAS_SENDMMSG) || !defined(SRS_AUTO_SENDMMSG) - static int DEFAULT = 1; + return 1; #else static int DEFAULT = 256; -#endif SrsConfDirective* conf = root->get("rtc_server"); if (!conf) { @@ -4675,6 +4674,7 @@ int SrsConfig::get_rtc_server_sendmmsg() } return ::atoi(conf->arg0().c_str()); +#endif } SrsConfDirective* SrsConfig::get_rtc(string vhost)