Skip to content

Commit

Permalink
Merge pull request #749 from DarkVss/fix_for_binding_methods
Browse files Browse the repository at this point in the history
fixes for getting class name
  • Loading branch information
walkor authored Apr 16, 2022
2 parents e7daf00 + 598b17f commit bd9c9b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ protected static function installSignal()
}
$signals = [\SIGINT, \SIGTERM, \SIGHUP, \SIGTSTP, \SIGQUIT, \SIGUSR1, \SIGUSR2, \SIGIOT, \SIGIO];
foreach ($signals as $signal) {
\pcntl_signal($signal, [Worker::class, 'signalHandler'], false);
\pcntl_signal($signal, [static::class, 'signalHandler'], false);
}
// ignore
\pcntl_signal(\SIGPIPE, \SIG_IGN, false);
Expand All @@ -1135,7 +1135,7 @@ protected static function reinstallSignal()
$signals = [\SIGINT, \SIGTERM, \SIGHUP, \SIGTSTP, \SIGQUIT, \SIGUSR1, \SIGUSR2, \SIGIOT, \SIGIO];
foreach ($signals as $signal) {
\pcntl_signal($signal, \SIG_IGN, false);
static::$globalEvent->onSignal($signal, '\Workerman\Worker::signalHandler');
static::$globalEvent->onSignal($signal, staitc::class . '::signalHandler');
};
}

Expand Down Expand Up @@ -1917,7 +1917,7 @@ protected static function writeStatisticsToStatusFile()

// For child processes.
\reset(static::$_workers);
/** @var \Workerman\Worker $worker */
/** @var static $worker */
$worker = current(static::$_workers);
$worker_status_str = \posix_getpid() . "\t" . \str_pad(round(memory_get_usage(true) / (1024 * 1024), 2) . "M", 7)
. " " . \str_pad($worker->getSocketName(), static::$_maxSocketNameLength) . " "
Expand Down Expand Up @@ -1972,7 +1972,7 @@ protected static function writeConnectionsStatisticsToStatusFile()
$current_worker = current(static::$_workers);
$default_worker_name = $current_worker->name;

/** @var \Workerman\Worker $worker */
/** @var static $worker */
foreach(TcpConnection::$connections as $connection) {
/** @var \Workerman\Connection\TcpConnection $connection */
$transport = $connection->transport;
Expand Down

0 comments on commit bd9c9b3

Please sign in to comment.