mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 11:38:50 -07:00
commit
4adcd03ec7
10 changed files with 114 additions and 7 deletions
|
@ -76,6 +76,7 @@
|
|||
#include "base/unicodestrings.h"
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/random.h"
|
||||
#include "base/utils/string.h"
|
||||
#include "cachestatus.h"
|
||||
#include "magneturi.h"
|
||||
|
@ -2210,7 +2211,7 @@ void Session::setSaveResumeDataInterval(uint value)
|
|||
|
||||
int Session::port() const
|
||||
{
|
||||
static int randomPort = rand() % 64512 + 1024;
|
||||
static int randomPort = Utils::Random::rand(1024, 65535);
|
||||
if (useRandomPort())
|
||||
return randomPort;
|
||||
return m_port;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue