Skip to content

Commit

Permalink
fix: The server object does not need a reference
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Apr 13, 2018
1 parent cbb7e0a commit 4c940b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

websocket server for swoft

# Install
## Install

- composer command

```bash
composer require swoft/websocket-server
```

# Document
## Document

Please see [document site](https://doc.swoft.org)

# unit testing
## Unit testing

```bash
phpunit
```

# LICENSE
## LICENSE

The Component is open-sourced software licensed under the [Apache license](LICENSE).

7 changes: 4 additions & 3 deletions src/Command/WsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ public function start()
{
$server = $this->createServerManager();

// Sever 配置参数
$serverOpts = $server->getServerSetting();

// 是否正在运行
if ($server->isRunning()) {
$serverOpts = $server->getServerSetting();

\output()->writeln("<error>The server have been running!(PID: {$serverOpts['masterPid']})</error>", true, true);
} else {
$serverOpts = $server->getServerSetting();
}

// 启动参数
Expand Down

0 comments on commit 4c940b7

Please sign in to comment.