mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 10:13:22 +02:00
change new Node flag to isForcedNeverSilent
This commit is contained in:
parent
747cca9beb
commit
10649c8f6e
3 changed files with 5 additions and 5 deletions
|
@ -2267,7 +2267,7 @@ void DomainServer::updateDownstreamNodes() {
|
|||
// manually add the downstream node to our node list
|
||||
auto node = nodeList->addOrUpdateNode(QUuid::createUuid(), downstreamNodeType,
|
||||
downstreamServerAddr, downstreamServerAddr);
|
||||
node->setIsForcedAlive(true);
|
||||
node->setIsForcedNeverSilent(true);
|
||||
|
||||
qDebug() << "Adding downstream node:" << node->getUUID() << downstreamServerAddr;
|
||||
|
||||
|
|
|
@ -749,7 +749,7 @@ void LimitedNodeList::removeSilentNodes() {
|
|||
SharedNodePointer node = it->second;
|
||||
node->getMutex().lock();
|
||||
|
||||
if (!node->isForcedAlive()
|
||||
if (!node->isForcedNeverSilent()
|
||||
&& (usecTimestampNow() - node->getLastHeardMicrostamp()) > (NODE_SILENCE_THRESHOLD_MSECS * USECS_PER_MSEC)) {
|
||||
// call the NodeHash erase to get rid of this node
|
||||
it = _nodeHash.unsafe_erase(it);
|
||||
|
|
|
@ -76,8 +76,8 @@ public:
|
|||
float getOutboundBandwidth() const; // in kbps
|
||||
float getInboundBandwidth() const; // in kbps
|
||||
|
||||
bool isForcedAlive() const { return _isForcedAlive; }
|
||||
void setIsForcedAlive(bool isForcedAlive) { _isForcedAlive = isForcedAlive; }
|
||||
bool isForcedNeverSilent() const { return _isForcedNeverSilent; }
|
||||
void setIsForcedNeverSilent(bool isForcedNeverSilent) { _isForcedNeverSilent = isForcedNeverSilent; }
|
||||
|
||||
friend QDataStream& operator<<(QDataStream& out, const NetworkPeer& peer);
|
||||
friend QDataStream& operator>>(QDataStream& in, NetworkPeer& peer);
|
||||
|
@ -107,7 +107,7 @@ protected:
|
|||
|
||||
int _connectionAttempts;
|
||||
|
||||
bool _isForcedAlive { false };
|
||||
bool _isForcedNeverSilent { false };
|
||||
};
|
||||
|
||||
QDebug operator<<(QDebug debug, const NetworkPeer &peer);
|
||||
|
|
Loading…
Reference in a new issue