Fix for limiting AKAs, show parent PID that forked child, other minor fixes
This commit is contained in:
@@ -249,11 +249,15 @@ abstract class Protocol
|
||||
*/
|
||||
public function onConnect(SocketClient $client): ?int
|
||||
{
|
||||
$ppid = getmypid();
|
||||
$pid = pcntl_fork();
|
||||
|
||||
if ($pid === -1)
|
||||
throw new SocketException(SocketException::CANT_ACCEPT,'Could not fork process');
|
||||
|
||||
if ($pid)
|
||||
Log::info(sprintf('%s:- Running connection in pid [%d] (%d)',self::LOGKEY,$pid,$ppid));
|
||||
|
||||
// Parent return ready for next connection
|
||||
return $pid;
|
||||
}
|
||||
@@ -295,11 +299,12 @@ abstract class Protocol
|
||||
|
||||
/**
|
||||
* Our addresses to send to the remote
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
protected function our_addresses(): Collection
|
||||
{
|
||||
if ($this->setup->optionGet(Setup::O_HIDEAKA)) {
|
||||
if ($this->setup->optionGet(Setup::O_HIDEAKA,'options_options')) {
|
||||
$addresses = collect();
|
||||
|
||||
foreach (($this->originate ? $this->node->aka_remote_authed : $this->node->aka_remote) as $ao)
|
||||
|
Reference in New Issue
Block a user