Skip to content

Commit fbf5623

Browse files
committed
Merge branch '4.1' of github.com:walkor/workerman into 4.1
2 parents 5d248a3 + 740640d commit fbf5623

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Connection/TcpConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class TcpConnection extends ConnectionInterface
160160
/**
161161
* Context.
162162
*
163-
* @var array
163+
* @var object|null
164164
*/
165165
public $context = null;
166166

Worker.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Worker
3434
*
3535
* @var string
3636
*/
37-
const VERSION = '4.1.4';
37+
const VERSION = '4.1.5';
3838

3939
/**
4040
* Status starting.
@@ -1557,6 +1557,7 @@ protected static function forkOneWorkerForLinux(self $worker)
15571557
elseif (0 === $pid) {
15581558
\srand();
15591559
\mt_srand();
1560+
static::$_gracefulStop = false;
15601561
if ($worker->reusePort) {
15611562
$worker->listen();
15621563
}
@@ -1882,6 +1883,8 @@ public static function stopAll($code = 0, $log = '')
18821883
} else {
18831884
$sig = \SIGINT;
18841885
}
1886+
// Fix exit with status 2
1887+
usleep(50000);
18851888
foreach ($worker_pid_array as $worker_pid) {
18861889
\posix_kill($worker_pid, $sig);
18871890
if(!static::$_gracefulStop){

0 commit comments

Comments
 (0)