mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Change reuseport to 1
This commit is contained in:
parent
89c0748234
commit
acb8793140
2 changed files with 7 additions and 5 deletions
|
@ -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)
|
||||
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…
Add table
Add a link
Reference in a new issue