Merge pull request #15403 from SimonWalton-HiFi/avatar-mixer-restart-82

Avatar-Mixer restart issues (RC82)
This commit is contained in:
John Conklin II 2019-04-17 16:28:31 -07:00 committed by GitHub
commit d8ba08ec2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View file

@ -588,6 +588,8 @@ void LimitedNodeList::eraseAllNodes() {
foreach(const SharedNodePointer& killedNode, killedNodes) { foreach(const SharedNodePointer& killedNode, killedNodes) {
handleNodeKill(killedNode); handleNodeKill(killedNode);
} }
_delayedNodeAdds.clear();
} }
void LimitedNodeList::reset() { void LimitedNodeList::reset() {
@ -755,7 +757,7 @@ void LimitedNodeList::delayNodeAdd(NewNodeInfo info) {
} }
void LimitedNodeList::removeDelayedAdd(QUuid nodeUUID) { void LimitedNodeList::removeDelayedAdd(QUuid nodeUUID) {
auto it = std::find_if(_delayedNodeAdds.begin(), _delayedNodeAdds.end(), [&](auto info) { auto it = std::find_if(_delayedNodeAdds.begin(), _delayedNodeAdds.end(), [&](const auto& info) {
return info.uuid == nodeUUID; return info.uuid == nodeUUID;
}); });
if (it != _delayedNodeAdds.end()) { if (it != _delayedNodeAdds.end()) {
@ -764,7 +766,7 @@ void LimitedNodeList::removeDelayedAdd(QUuid nodeUUID) {
} }
bool LimitedNodeList::isDelayedNode(QUuid nodeUUID) { bool LimitedNodeList::isDelayedNode(QUuid nodeUUID) {
auto it = std::find_if(_delayedNodeAdds.begin(), _delayedNodeAdds.end(), [&](auto info) { auto it = std::find_if(_delayedNodeAdds.begin(), _delayedNodeAdds.end(), [&](const auto& info) {
return info.uuid == nodeUUID; return info.uuid == nodeUUID;
}); });
return it != _delayedNodeAdds.end(); return it != _delayedNodeAdds.end();

View file

@ -26,7 +26,7 @@ const quint16 ICE_SERVER_DEFAULT_PORT = 7337;
const int ICE_HEARBEAT_INTERVAL_MSECS = 2 * 1000; const int ICE_HEARBEAT_INTERVAL_MSECS = 2 * 1000;
const int MAX_ICE_CONNECTION_ATTEMPTS = 5; const int MAX_ICE_CONNECTION_ATTEMPTS = 5;
const int UDP_PUNCH_PING_INTERVAL_MS = 25; const int UDP_PUNCH_PING_INTERVAL_MS = 250;
class NetworkPeer : public QObject { class NetworkPeer : public QObject {
Q_OBJECT Q_OBJECT

View file

@ -752,11 +752,11 @@ void NodeList::pingPunchForInactiveNode(const SharedNodePointer& node) {
flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SendAudioPing); flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SendAudioPing);
} }
// every second we're trying to ping this node and we're not getting anywhere - debug that out // every two seconds we're trying to ping this node and we're not getting anywhere - debug that out
const int NUM_DEBUG_CONNECTION_ATTEMPTS = 1000 / (UDP_PUNCH_PING_INTERVAL_MS); const int NUM_DEBUG_CONNECTION_ATTEMPTS = 2000 / (UDP_PUNCH_PING_INTERVAL_MS);
if (node->getConnectionAttempts() > 0 && node->getConnectionAttempts() % NUM_DEBUG_CONNECTION_ATTEMPTS == 0) { if (node->getConnectionAttempts() > 0 && node->getConnectionAttempts() % NUM_DEBUG_CONNECTION_ATTEMPTS == 0) {
qCDebug(networking) << "No response to UDP hole punch pings for node" << node->getUUID() << "in last second."; qCDebug(networking) << "No response to UDP hole punch pings for node" << node->getUUID() << "in last 2 s.";
} }
auto nodeID = node->getUUID(); auto nodeID = node->getUUID();