Skip to content

Commit

Permalink
Merge branch '4.1' of github.com:walkor/workerman into 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Jan 13, 2023
2 parents 5d248a3 + 740640d commit fbf5623
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Connection/TcpConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class TcpConnection extends ConnectionInterface
/**
* Context.
*
* @var array
* @var object|null
*/
public $context = null;

Expand Down
5 changes: 4 additions & 1 deletion Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Worker
*
* @var string
*/
const VERSION = '4.1.4';
const VERSION = '4.1.5';

/**
* Status starting.
Expand Down Expand Up @@ -1557,6 +1557,7 @@ protected static function forkOneWorkerForLinux(self $worker)
elseif (0 === $pid) {
\srand();
\mt_srand();
static::$_gracefulStop = false;
if ($worker->reusePort) {
$worker->listen();
}
Expand Down Expand Up @@ -1882,6 +1883,8 @@ public static function stopAll($code = 0, $log = '')
} else {
$sig = \SIGINT;
}
// Fix exit with status 2
usleep(50000);
foreach ($worker_pid_array as $worker_pid) {
\posix_kill($worker_pid, $sig);
if(!static::$_gracefulStop){
Expand Down

0 comments on commit fbf5623

Please sign in to comment.