mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
parent
6540946c85
commit
3fe8570726
@ -6,6 +6,7 @@
|
||||
**Merged pull requests:**
|
||||
|
||||
- Release v2.1.5-2023.09 🎉
|
||||
- Minor improvements [\#235](https://github.com/torrentpier/torrentpier-lts/pull/235) ([belomaxorka](https://github.com/belomaxorka))
|
||||
|
||||
## [v2.1.5-2023.08](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.08) (2023-09-04)
|
||||
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.07...v2.1.5-2023.08)
|
||||
|
@ -239,7 +239,7 @@ else
|
||||
|
||||
if (empty($row['topic_id']))
|
||||
{
|
||||
msg_die('Torrent not registered, info_hash = ' . bin2hex($info_hash_sql));
|
||||
msg_die('Torrent not registered, info_hash = ' . bin2hex($info_hash));
|
||||
}
|
||||
if (empty($row['user_id']))
|
||||
{
|
||||
@ -487,16 +487,16 @@ if (!$output)
|
||||
LIMIT 1
|
||||
");
|
||||
|
||||
$seeders = $row['seeders'];
|
||||
$leechers = $row['leechers'];
|
||||
$seeders = isset($row['seeders']) ? $row['seeders'] : 0;
|
||||
$leechers = isset($row['leechers']) ? $row['leechers'] : 0;
|
||||
}
|
||||
|
||||
$output = array(
|
||||
'interval' => (int) $announce_interval,
|
||||
'min interval' => (int) $announce_interval,
|
||||
'peers' => $peers,
|
||||
'complete' => (int) $seeders,
|
||||
'incomplete' => (int) $leechers,
|
||||
'peers' => $peers,
|
||||
);
|
||||
|
||||
$peers_list_cached = CACHE('tr_cache')->set(PEERS_LIST_PREFIX . $topic_id, $output, PEERS_LIST_EXPIRE);
|
||||
@ -508,4 +508,4 @@ if (!$output)
|
||||
echo bencode($output);
|
||||
|
||||
tracker_exit();
|
||||
exit;
|
||||
exit;
|
||||
|
@ -61,6 +61,7 @@ $bb_cfg['cache']['memcache'] = array(
|
||||
$bb_cfg['cache']['redis'] = array(
|
||||
'host' => '127.0.0.1',
|
||||
'port' => 6379,
|
||||
'pconnect' => true,
|
||||
'con_required' => true,
|
||||
);
|
||||
|
||||
|
6
library/includes/cache/redis.php
vendored
6
library/includes/cache/redis.php
vendored
@ -26,10 +26,12 @@ class cache_redis extends cache_common
|
||||
|
||||
function connect ()
|
||||
{
|
||||
$connect_type = ($this->cfg['pconnect']) ? 'pconnect' : 'connect';
|
||||
|
||||
$this->cur_query = 'connect '. $this->cfg['host'] .':'. $this->cfg['port'];
|
||||
$this->debug('start');
|
||||
|
||||
if (@$this->redis->connect($this->cfg['host'], $this->cfg['port']))
|
||||
if (@$this->redis->$connect_type($this->cfg['host'], $this->cfg['port']))
|
||||
{
|
||||
$this->connected = true;
|
||||
}
|
||||
@ -113,4 +115,4 @@ class cache_redis extends cache_common
|
||||
{
|
||||
return class_exists('Redis');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,10 +25,12 @@ class datastore_redis extends datastore_common
|
||||
|
||||
function connect ()
|
||||
{
|
||||
$connect_type = ($this->cfg['pconnect']) ? 'pconnect' : 'connect';
|
||||
|
||||
$this->cur_query = 'connect '. $this->cfg['host'] .':'. $this->cfg['port'];
|
||||
$this->debug('start');
|
||||
|
||||
if (@$this->redis->connect($this->cfg['host'],$this->cfg['port']))
|
||||
if (@$this->redis->$connect_type($this->cfg['host'], $this->cfg['port']))
|
||||
{
|
||||
$this->connected = true;
|
||||
}
|
||||
@ -103,4 +105,4 @@ class datastore_redis extends datastore_common
|
||||
{
|
||||
return class_exists('Redis');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user