RTC: Change reuseport to 1

pull/1830/head
winlin 5 years ago
parent 89c0748234
commit acb8793140

@ -440,8 +440,8 @@ rtc_server {
# We listen multiple times at the same port, by REUSEPORT, to increase the UDP queue.
# Note that you can set to 1 and increase the system UDP buffer size by net.core.rmem_max
# and net.core.rmem_default or just increase this to get larger UDP recv and send buffer.
# default: 4
reuseport 4;
# default: 1
reuseport 1;
# Whether merge multiple NALUs into one.
# @see https://github.com/ossrs/srs/issues/307#issuecomment-612806318
# default: on

@ -4820,8 +4820,10 @@ int SrsConfig::get_rtc_server_reuseport()
int v = get_rtc_server_reuseport2();
#if !defined(SO_REUSEPORT)
srs_warn("REUSEPORT not supported, reset %d to %d", reuseport, DEFAULT);
v = 1
if (v > 1) {
srs_warn("REUSEPORT not supported, reset %d to %d", reuseport, DEFAULT);
v = 1
}
#endif
return v;
@ -4829,7 +4831,7 @@ int SrsConfig::get_rtc_server_reuseport()
int SrsConfig::get_rtc_server_reuseport2()
{
static int DEFAULT = 4;
static int DEFAULT = 1;
SrsConfDirective* conf = root->get("rtc_server");
if (!conf) {

Loading…
Cancel
Save