mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
re-send heartbeat to ICE server after max connection attempts
This commit is contained in:
parent
d9e0c91e02
commit
55a7180838
2 changed files with 8 additions and 2 deletions
|
@ -59,7 +59,7 @@ public:
|
|||
|
||||
bool requiresICE() const { return !_iceServerSockAddr.isNull(); }
|
||||
const HifiSockAddr& getICEServerSockAddr() const { return _iceServerSockAddr; }
|
||||
const NetworkPeer& getICEPeer() const { return _icePeer; }
|
||||
NetworkPeer& getICEPeer() const { return _icePeer; }
|
||||
void activateICELocalSocket();
|
||||
void activateICEPublicSocket();
|
||||
|
||||
|
|
|
@ -335,7 +335,11 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
}
|
||||
|
||||
void NodeList::handleICEConnectionToDomainServer() {
|
||||
if (_domainHandler.getICEPeer().isNull()) {
|
||||
if (_domainHandler.getICEPeer().isNull()
|
||||
|| _domainHandler.getICEPeer().getConnectionAttempts() >= MAX_ICE_CONNECTION_ATTEMPTS) {
|
||||
|
||||
_domainHandler.getICEPeer().resetConnectionAttemps();
|
||||
|
||||
LimitedNodeList::sendHeartbeatToIceServer(_domainHandler.getICEServerSockAddr(),
|
||||
_domainHandler.getICEClientID(),
|
||||
_domainHandler.getUUID());
|
||||
|
@ -349,6 +353,8 @@ void NodeList::handleICEConnectionToDomainServer() {
|
|||
|
||||
QByteArray publicPingPacket = constructPingPacket(PingType::Public, false, _domainHandler.getICEClientID());
|
||||
writeUnverifiedDatagram(publicPingPacket, _domainHandler.getICEPeer().getPublicSocket());
|
||||
|
||||
_domainHandler.getICEPeer().incrementConnectionAttempts();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue