Skip to content

Commit

Permalink
fix PhpRedis connector
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkruss committed Jul 12, 2018
1 parent 21709c9 commit 8e24284
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Illuminate/Redis/Connectors/PhpRedisConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected function establishConnection($client, array $config)
{
($config['persistent'] ?? false)
? $this->establishPersistentConnection($client, $config)
: $this->establishRegularConnection($client, $config);
: $this->establishTemporaryConnection($client, $config);
}

/**
Expand All @@ -110,7 +110,9 @@ protected function establishPersistentConnection($client, array $config)
$config['host'],
$config['port'],
Arr::get($config, 'timeout', 0.0),
Arr::get($config, 'persistent_id', null)
Arr::get($config, 'persistent_id', null),
Arr::get($config, 'retry_interval', null),
Arr::get($config, 'read_timeout', null)
);
}

Expand All @@ -121,14 +123,15 @@ protected function establishPersistentConnection($client, array $config)
* @param array $config
* @return void
*/
protected function establishRegularConnection($client, array $config)
protected function establishTemporaryConnection($client, array $config)
{
$client->connect(
$config['host'],
$config['port'],
Arr::get($config, 'timeout', 0.0),
Arr::get($config, 'reserved', null),
Arr::get($config, 'retry_interval', 0)
null,
Arr::get($config, 'retry_interval', 0),
Arr::get($config, 'read_timeout', 0.0)
);
}

Expand Down

0 comments on commit 8e24284

Please sign in to comment.