public function stop()
    {
        $rpcServer = $this->getRpcServer();

        // 是否已启动
        if (! $rpcServer->isRunning()) {
            \output()->writeln('<error>The server is not running! cannot stop</error>', true, true);
        }

        // pid文件
        $serverStatus = $rpcServer->getServerSetting();
        $pidFile = $serverStatus['pfile'];

        \output()->writeln(sprintf('<info>Swoft %s is stopping ...</info>', input()->getFullScript()));

        $result = $rpcServer->stop();

        // 停止失败
        if (! $result) {
            \output()->writeln(sprintf('<error>Swoft %s stop fail</error>', input()->getFullScript()));
        }
        //删除pid文件
        @unlink($pidFile);

        \output()->writeln(sprintf('<success>Swoft %s stop success</success>', input()->getFullScript()));
    }