mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
This commit is contained in:
parent
d8f52918aa
commit
bc93147426
7 changed files with 112 additions and 34 deletions
19
trunk/3rdparty/patches/3.st.osx.kqueue.patch
vendored
Normal file
19
trunk/3rdparty/patches/3.st.osx.kqueue.patch
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
*** io.c Fri Oct 2 06:49:07 2009
|
||||
--- ../st-1.9-patch/io.c Mon Mar 16 15:06:28 2015
|
||||
***************
|
||||
*** 89,94 ****
|
||||
--- 89,102 ----
|
||||
if (fdlim > 0 && rlim.rlim_max > (rlim_t) fdlim) {
|
||||
rlim.rlim_max = fdlim;
|
||||
}
|
||||
+
|
||||
+ /* when rlimit max is negative, for example, osx, use cur directly. */
|
||||
+ /* @see https://github.com/winlinvip/simple-rtmp-server/issues/336 */
|
||||
+ if ((int)rlim.rlim_max < 0) {
|
||||
+ _st_osfd_limit = (int)(fdlim > 0? fdlim : rlim.rlim_cur);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
rlim.rlim_cur = rlim.rlim_max;
|
||||
if (setrlimit(RLIMIT_NOFILE, &rlim) < 0)
|
||||
return -1;
|
Loading…
Add table
Add a link
Reference in a new issue