diff --git a/src/ConnectionConfig.php b/src/ConnectionConfig.php index 125ff7c..181bd4f 100644 --- a/src/ConnectionConfig.php +++ b/src/ConnectionConfig.php @@ -85,7 +85,7 @@ public function __construct( public function getConnectionString(): string { - return 'tcp://' . $this->getHost() . ':' . $this->getPort(); + return $this->getHost()[0] == "/" ? 'unix://' . $this->getHost() : 'tcp://' . $this->getHost() . ':' . $this->getPort(); } public function isCompressionEnabled(): bool