|
|
@@ -3,15 +3,10 @@
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
use App\Helpers\Jwt;
|
|
|
-use App\Models\ImChatModel;
|
|
|
use App\Models\LiveChatModel;
|
|
|
use App\Models\LiveModel;
|
|
|
use App\Models\MessageModel;
|
|
|
-use App\Services\Api\ImChatService;
|
|
|
use App\Services\Api\MemberService;
|
|
|
-use App\Services\Api\MessageService;
|
|
|
-use App\Services\ConfigService;
|
|
|
-use App\Services\LiveService;
|
|
|
use App\Services\RedisService;
|
|
|
use Illuminate\Console\Command;
|
|
|
use Monolog\Logger;
|
|
|
@@ -366,6 +361,12 @@ class SocketServer extends Command
|
|
|
public function stop()
|
|
|
{
|
|
|
if ($this->ws) {
|
|
|
+ // 直接杀
|
|
|
+ if(function_exists('exec')){
|
|
|
+ exec('pkill -9 php artisan swoole:socket start');
|
|
|
+ }
|
|
|
+
|
|
|
+ echo "socket stop...\n";
|
|
|
$date = date('Y-m-d H:i:s');
|
|
|
$this->info("【{$date}】Socket:停止运行服务");
|
|
|
$this->ws->close();
|