C websockify: Fix file descriptor leak
After fork() the parent process has a copy of clients file descriptor which needs to be closed by the parent to prevent a descriptor leak.
This commit is contained in:
parent
3a03e3c59d
commit
e7af149cd1
|
@ -861,6 +861,7 @@ void start_server() {
|
||||||
break; // Child process exits
|
break; // Child process exits
|
||||||
} else { // parent process
|
} else { // parent process
|
||||||
settings.handler_id += 1;
|
settings.handler_id += 1;
|
||||||
|
close(csock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
|
|
Loading…
Reference in New Issue