Fix broken tr_sessionSetPeerPortRandom() function. (#3569)

This commit is contained in:
Viacheslav Chimishuk 2022-08-03 06:38:37 +03:00 committed by GitHub
parent df7a44adb2
commit 8e604b44a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1291,10 +1291,10 @@ uint16_t tr_sessionGetPeerPort(tr_session const* session)
uint16_t tr_sessionSetPeerPortRandom(tr_session* session)
{
TR_ASSERT(tr_isSession(session));
tr_port p = getRandomPort(session);
tr_sessionSetPeerPort(session, p.host());
session->setPeerPort(getRandomPort(session));
return session->private_peer_port.host();
return p.host();
}
void tr_sessionSetPeerPortRandomOnStart(tr_session* session, bool random)