Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ludicrousdb/includes/class-ludicrousdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,8 @@ protected function single_db_connect( $dbhname, $host, $user, $password ) {
$socket = substr( $maybe_socket, 1 );
}
} else {
$socket = $port_or_socket;
// otherwise it will fail if the host is specified originally like ':/var/lib/mysql/mysql.sock', since we will have a port appended here still
$socket = strtok( $port_or_socket, ':' );
}
}

Expand Down Expand Up @@ -2295,6 +2296,11 @@ public function check_tcp_responsiveness( $host, $port, $float_timeout ) {
$errno = 0;
$errstr = '';

if ( strstr( $host, ':' ) !== false ) {
$host = 'unix://' . substr( $host, strpos( $host, ':' ) + 1 );
$port = -1;
}

// Try to get a new socket
// phpcs:disable
$socket = $this->is_debug()
Expand Down
Loading