Fixed peer status updating.
This commit is contained in:
parent
338881b7ec
commit
9c4cbcfff7
1 changed files with 9 additions and 9 deletions
|
@ -89,15 +89,15 @@ class TorrentPeers {
|
||||||
int $bytesRemaining
|
int $bytesRemaining
|
||||||
): void {
|
): void {
|
||||||
$stmt = $this->cache->get('UPDATE ser_torrents_peers SET peer_address = INET6_ATON(?), peer_port = ?, peer_updated = NOW(), peer_expires = NOW() + INTERVAL ? SECOND, peer_agent = ?, peer_uploaded = ?, peer_downloaded = ?, peer_left = ? WHERE torrent_id = ? AND peer_id = ?');
|
$stmt = $this->cache->get('UPDATE ser_torrents_peers SET peer_address = INET6_ATON(?), peer_port = ?, peer_updated = NOW(), peer_expires = NOW() + INTERVAL ? SECOND, peer_agent = ?, peer_uploaded = ?, peer_downloaded = ?, peer_left = ? WHERE torrent_id = ? AND peer_id = ?');
|
||||||
$stmt->addParameter(1, $torrentInfo instanceof TorrentInfo ? $torrentInfo->getId() : $torrentInfo);
|
$stmt->addParameter(1, $remoteAddr);
|
||||||
$stmt->addParameter(2, $peerInfo instanceof TorrentPeerInfo ? $peerInfo->getId() : $peerInfo);
|
$stmt->addParameter(2, $remotePort);
|
||||||
$stmt->addParameter(3, $remoteAddr);
|
$stmt->addParameter(3, $interval);
|
||||||
$stmt->addParameter(4, $remotePort);
|
$stmt->addParameter(4, $peerAgent);
|
||||||
$stmt->addParameter(5, $interval);
|
$stmt->addParameter(5, $bytesUploaded);
|
||||||
$stmt->addParameter(6, $peerAgent);
|
$stmt->addParameter(6, $bytesDownloaded);
|
||||||
$stmt->addParameter(7, $bytesUploaded);
|
$stmt->addParameter(7, $bytesRemaining);
|
||||||
$stmt->addParameter(8, $bytesDownloaded);
|
$stmt->addParameter(8, $torrentInfo instanceof TorrentInfo ? $torrentInfo->getId() : $torrentInfo);
|
||||||
$stmt->addParameter(9, $bytesRemaining);
|
$stmt->addParameter(9, $peerInfo instanceof TorrentPeerInfo ? $peerInfo->getId() : $peerInfo);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue