mirror of
https://github.com/M66B/NetGuard.git
synced 2024-12-25 01:07:52 +00:00
Limit number of sessions to FD_SETSIZE
This commit is contained in:
parent
c13032258c
commit
c36ff9e420
1 changed files with 2 additions and 0 deletions
|
@ -68,6 +68,8 @@ void *handle_events(void *a) {
|
|||
log_android(ANDROID_LOG_WARN, "getrlimit soft %d hard %d max sessions %d",
|
||||
rlim.rlim_cur, rlim.rlim_max, maxsessions);
|
||||
}
|
||||
if (maxsessions > FD_SETSIZE)
|
||||
maxsessions = FD_SETSIZE;
|
||||
|
||||
// Block SIGUSR1
|
||||
sigemptyset(&blockset);
|
||||
|
|
Loading…
Reference in a new issue