Skip to content

Commit

Permalink
fix server port get from ini config
Browse files Browse the repository at this point in the history
  • Loading branch information
millken chen committed Sep 30, 2018
1 parent 3fcfa05 commit 98cee81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Application/Swoole.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public function build()
$sslAddress = $swoole['server']['ssl_address'] ?? '';
$sslPort = $swoole['server']['ssl_port'] ?? 443;
$options = $swoole['options'] ?? [];
$this->server = new SwooleHttpServer($address, $port, SWOOLE_PROCESS, SWOOLE_TCP);
$this->server = new SwooleHttpServer($address, intval($port), SWOOLE_PROCESS, SWOOLE_TCP);
if ($sslAddress) {
$this->server->addlistener($sslAddress, $sslPort, SWOOLE_TCP | SWOOLE_SSL);
$this->server->addlistener($sslAddress, intval($sslPort), SWOOLE_TCP | SWOOLE_SSL);
}

$this->server->set($options);
Expand Down

0 comments on commit 98cee81

Please sign in to comment.