Skip to content

Commit

Permalink
[dsn] Cluster DSN
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim committed Nov 17, 2018
1 parent 79c8586 commit c2851ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WampConnectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private function establishConnection(): Client

private function parseDsn(string $dsn): array
{
$dsn = new Dsn($dsn);
$dsn = Dsn::parseFirst($dsn);

if (false === in_array($dsn->getSchemeProtocol(), ['wamp', 'ws'], true)) {
throw new \LogicException(sprintf(
Expand All @@ -97,9 +97,9 @@ private function parseDsn(string $dsn): array
return array_filter(array_replace($dsn->getQuery(), [
'host' => $dsn->getHost(),
'port' => $dsn->getPort(),
'max_retries' => $dsn->getInt('max_retries'),
'max_retries' => $dsn->getDecimal('max_retries'),
'initial_retry_delay' => $dsn->getFloat('initial_retry_delay'),
'max_retry_delay' => $dsn->getInt('max_retry_delay'),
'max_retry_delay' => $dsn->getDecimal('max_retry_delay'),
'retry_delay_growth' => $dsn->getFloat('retry_delay_growth'),
]), function ($value) { return null !== $value; });
}
Expand Down

0 comments on commit c2851ca

Please sign in to comment.