|
|
@@ -362,9 +362,9 @@ class SocketServer extends Command
|
|
|
{
|
|
|
if ($this->ws) {
|
|
|
// 直接杀
|
|
|
- $port = env('SOCKET_PORT', '6530');
|
|
|
- if(function_exists('exec')){
|
|
|
- exec('pid=$(lsof -F p -i:'.$port.' | cut -b 2-) && pkill -9 $pid');
|
|
|
+ $stoSh = base_path().'/crontab/socketStop.sh';
|
|
|
+ if(file_exists($stoSh) && function_exists('exec')){
|
|
|
+ exec("{$stoSh}");
|
|
|
}
|
|
|
|
|
|
echo "socket stop...\n";
|