Respond with loopback if peer list is empty (#933)

Respond with loopback if peers list is empty
This commit is contained in:
Constantine Kovalensky 2023-10-02 20:56:11 +04:00 committed by GitHub
commit ea70734a9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -369,6 +369,10 @@ if (!$output) {
LIMIT $numwant LIMIT $numwant
"); ");
if (empty($rowset)) {
$rowset[] = ['ip' => $ip, 'port' => $port];
}
if ($compact_mode) { if ($compact_mode) {
$peers = ''; $peers = '';

View file

@ -66,7 +66,7 @@ $bb_cfg['cache'] = [
'redis' => [ 'redis' => [
'host' => '127.0.0.1', 'host' => '127.0.0.1',
'port' => 6379, 'port' => 6379,
'pconnect' => PHP_ZTS ? false : true, 'pconnect' => !PHP_ZTS,
'con_required' => true, 'con_required' => true,
], ],
// Available cache types: filecache, memcache, sqlite, redis, apcu (filecache by default) // Available cache types: filecache, memcache, sqlite, redis, apcu (filecache by default)