Fix child processes exiting

This commit is contained in:
Deon George 2021-07-20 00:23:41 +10:00
parent ccab973b4a
commit 6027ce52ab
4 changed files with 7 additions and 3 deletions

View File

@ -103,6 +103,7 @@ final class Binkp extends BaseProtocol
$this->session(self::SESSION_BINKP,$client,(new Address));
$this->client->close();
Log::info(sprintf('%s: = End - Connection closed [%s]',__METHOD__,$client->address_remote));
exit(0);
}
return NULL;

View File

@ -83,6 +83,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
$this->session(self::SESSION_AUTO,$client,(new Address));
$this->client->close();
Log::info(sprintf('%s: = End - Connection closed [%s]',__METHOD__,$client->address_remote));
exit(0);
}
return NULL;

View File

@ -84,11 +84,11 @@ final class SocketServer {
$this->loop();
socket_close($this->server);
Log::info(sprintf('CLosed [%s:%d]',$this->bind,$this->port),['m'=>__METHOD__]);
Log::info(sprintf('Closed [%s:%d]',$this->bind,$this->port),['m'=>__METHOD__]);
}
/**
* Manage and execute incoming connecitons
* Manage and execute incoming connections
*
* @throws SocketException
*/

View File

@ -30,6 +30,7 @@ class StartServer extends Command
* Execute the console command.
*
* @return mixed
* @throws \Exception
*/
public function handle()
{
@ -53,6 +54,7 @@ class StartServer extends Command
$children = collect();
Log::debug(sprintf('%s:+ Starting Servers...',__METHOD__));
pcntl_signal(SIGCHLD,SIG_IGN);
foreach ($start as $item => $config) {
Log::debug(sprintf('%s: - Starting: [%s]',__METHOD__,$item));