Skip to content

Commit

Permalink
fix invalid fsockopen for ports since syntax is different to mysql_re…
Browse files Browse the repository at this point in the history
…al_connect
  • Loading branch information
kkmuffme committed Jan 24, 2025
1 parent 4acb275 commit 6a01fb4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ludicrousdb/includes/class-ludicrousdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -2296,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

0 comments on commit 6a01fb4

Please sign in to comment.