Skip to content

Commit 335c39a

Browse files
authored
Set transport type for Unix socket connections
1 parent 49627c1 commit 335c39a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Client.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ public function connect()
325325
$context = isset($this->_options['context']) ? $this->_options['context'] : [];
326326
$this->_connection = new AsyncTcpConnection($this->_address, $context);
327327
$this->_connection->protocol = Redis::class;
328+
if (str_starts_with(strtolower($this->_address), 'unix://')) {
329+
$this->_connection->transport = 'unix';
330+
}
328331
if(!empty($this->_options['ssl'])){
329332
$this->_connection->transport = 'ssl';
330333
}

0 commit comments

Comments
 (0)