mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 12:18:36 +02:00
fix for double ICE connect attempts from domain-server
This commit is contained in:
parent
f673ab316a
commit
4e0bb94cdd
2 changed files with 9 additions and 5 deletions
|
@ -1027,7 +1027,7 @@ void DomainServer::sendICEPingPackets() {
|
||||||
} else {
|
} else {
|
||||||
// send ping packets to this peer's interfaces
|
// send ping packets to this peer's interfaces
|
||||||
qDebug() << "Sending ping packets to establish connectivity with ICE peer with ID"
|
qDebug() << "Sending ping packets to establish connectivity with ICE peer with ID"
|
||||||
<< peer->getUUID();
|
<< peer->getUUID();
|
||||||
|
|
||||||
// send the ping packet to the local and public sockets for this node
|
// send the ping packet to the local and public sockets for this node
|
||||||
QByteArray localPingPacket = nodeList->constructPingPacket(PingType::Local, false);
|
QByteArray localPingPacket = nodeList->constructPingPacket(PingType::Local, false);
|
||||||
|
@ -1055,11 +1055,13 @@ void DomainServer::processICEHeartbeatResponse(const QByteArray& packet) {
|
||||||
while (!iceResponseStream.atEnd()) {
|
while (!iceResponseStream.atEnd()) {
|
||||||
iceResponseStream >> receivedPeer;
|
iceResponseStream >> receivedPeer;
|
||||||
|
|
||||||
if (!_connectingICEPeers.contains(receivedPeer.getUUID()) && !_connectedICEPeers.contains(receivedPeer.getUUID())) {
|
if (!_connectedICEPeers.contains(receivedPeer.getUUID())) {
|
||||||
qDebug() << "New peer requesting connection being added to hash -" << receivedPeer;
|
if (!_connectingICEPeers.contains(receivedPeer.getUUID())) {
|
||||||
|
qDebug() << "New peer requesting connection being added to hash -" << receivedPeer;
|
||||||
|
}
|
||||||
|
|
||||||
|
_connectingICEPeers[receivedPeer.getUUID()] = receivedPeer;
|
||||||
}
|
}
|
||||||
|
|
||||||
_connectingICEPeers[receivedPeer.getUUID()] = receivedPeer;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ NetworkPeer::NetworkPeer(const NetworkPeer& otherPeer) {
|
||||||
|
|
||||||
_wakeTimestamp = otherPeer._wakeTimestamp;
|
_wakeTimestamp = otherPeer._wakeTimestamp;
|
||||||
_lastHeardMicrostamp = otherPeer._lastHeardMicrostamp;
|
_lastHeardMicrostamp = otherPeer._lastHeardMicrostamp;
|
||||||
|
_connectionAttempts = otherPeer._connectionAttempts;
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkPeer& NetworkPeer::operator=(const NetworkPeer& otherPeer) {
|
NetworkPeer& NetworkPeer::operator=(const NetworkPeer& otherPeer) {
|
||||||
|
@ -62,6 +63,7 @@ void NetworkPeer::swap(NetworkPeer& otherPeer) {
|
||||||
swap(_localSocket, otherPeer._localSocket);
|
swap(_localSocket, otherPeer._localSocket);
|
||||||
swap(_wakeTimestamp, otherPeer._wakeTimestamp);
|
swap(_wakeTimestamp, otherPeer._wakeTimestamp);
|
||||||
swap(_lastHeardMicrostamp, otherPeer._lastHeardMicrostamp);
|
swap(_lastHeardMicrostamp, otherPeer._lastHeardMicrostamp);
|
||||||
|
swap(_connectionAttempts, otherPeer._connectionAttempts);
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray NetworkPeer::toByteArray() const {
|
QByteArray NetworkPeer::toByteArray() const {
|
||||||
|
|
Loading…
Reference in a new issue