Skip to content

Commit

Permalink
rename parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Feb 23, 2024
1 parent 2969700 commit fc4fa7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Servers/Reverb/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Factory
/**
* Create a new WebSocket server instance.
*/
public static function make(string $host = '0.0.0.0', string $port = '8080', string $url = null, array $options = [], string $protocol = 'pusher', ?LoopInterface $loop = null): HttpServer
public static function make(string $host = '0.0.0.0', string $port = '8080', string $hostname = null, array $options = [], string $protocol = 'pusher', ?LoopInterface $loop = null): HttpServer
{
$loop = $loop ?: Loop::get();

Expand All @@ -44,8 +44,8 @@ public static function make(string $host = '0.0.0.0', string $port = '8080', str
default => throw new InvalidArgumentException("Unsupported protocol [{$protocol}]."),
};

if(empty($options['tls']) && $url && Certificate::exists($url)) {
[$certificate, $key] = Certificate::resolve($url);
if(empty($options['tls']) && $hostname && Certificate::exists($hostname)) {
[$certificate, $key] = Certificate::resolve($hostname);

$options['tls']['local_cert'] = $certificate;
$options['tls']['local_pk'] = $key;
Expand Down

0 comments on commit fc4fa7e

Please sign in to comment.