|
|
@@ -360,15 +360,16 @@ class SocketServer extends Command
|
|
|
*/
|
|
|
public function stop()
|
|
|
{
|
|
|
- if ($this->ws) {
|
|
|
- // 直接杀
|
|
|
- $stoSh = base_path().'/crontab/socketStop.sh';
|
|
|
- if(file_exists($stoSh) && function_exists('exec')){
|
|
|
- exec("{$stoSh}");
|
|
|
- }
|
|
|
+ // 直接杀
|
|
|
+ $stoSh = base_path().'/crontab/socketStop.sh';
|
|
|
+ if(file_exists($stoSh) && function_exists('exec')){
|
|
|
+ exec("{$stoSh}");
|
|
|
+ }
|
|
|
|
|
|
- echo "$stoSh";
|
|
|
- echo "socket stop...\n";
|
|
|
+ echo "$stoSh";
|
|
|
+ echo "socket stop...\n";
|
|
|
+
|
|
|
+ if ($this->ws) {
|
|
|
$date = date('Y-m-d H:i:s');
|
|
|
$this->info("【{$date}】Socket:停止运行服务");
|
|
|
$this->ws->close();
|