Skip to content

Commit

Permalink
🐍 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 authored Jan 19, 2025
1 parent 39ff5eb commit e36efcc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/network/mtp/threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,17 +587,17 @@ void ConnectionSendThread::disconnect_peer(session_t peer_id)
void ConnectionSendThread::fix_peer_id(session_t own_peer_id)
{
auto peer_ids = m_connection->getPeerIDs();
for (const session_t peerId : peer_ids) {
PeerHelper peer = m_connection->getPeerNoEx(peerId);
for (const session_t peer_id : peer_ids) {
PeerHelper peer = m_connection->getPeerNoEx(peer_id);
if (!peer)
continue;

UDPPeer *udpPeer = dynamic_cast<UDPPeer *>(&peer);
if (!udpPeer)
auto *udp_peer = dynamic_cast<UDPPeer*>(&peer);
if (!udp_peer)
continue;

for (int ch = 0; ch < CHANNEL_COUNT; ch++) {
auto &channel = udpPeer->channels[ch];
auto &channel = udp_peer->channels[ch];

channel.outgoing_reliables_sent.fixPeerId(own_peer_id);
}
Expand Down

0 comments on commit e36efcc

Please sign in to comment.