Fix for missing avatar on second replay

Fixes a logic problem in the handshake request handling; deals with
KillAvatar from the Agent by removing the node-linked data, not
the actual Node; tweaks some of the network debug output.
This commit is contained in:
Simon Walton 2018-03-05 16:51:05 -08:00
parent d259e115c0
commit 8fb3015ec8
3 changed files with 9 additions and 2 deletions

View file

@ -605,7 +605,9 @@ void AvatarMixer::handleAvatarIdentityPacket(QSharedPointer<ReceivedMessage> mes
void AvatarMixer::handleKillAvatarPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer node) {
auto start = usecTimestampNow();
DependencyManager::get<NodeList>()->processKillNode(*message);
node->stopPingTimer();
emit(DependencyManager::get<NodeList>()->nodeKilled(node));
node->setLinkedData(nullptr);
auto end = usecTimestampNow();
_handleKillAvatarPacketElapsedTime += (end - start);

View file

@ -576,8 +576,9 @@ void Connection::processControl(ControlPacketPointer controlPacket) {
// where the other end expired our connection. Let's reset.
#ifdef UDT_CONNECTION_DEBUG
qCDebug(networking) << "Got handshake request, stopping SendQueue";
qCDebug(networking) << "Got HandshakeRequest from" << _destination << ", stopping SendQueue";
#endif
_hasReceivedHandshakeACK = false;
stopSendQueue();
}
break;

View file

@ -402,6 +402,10 @@ void Socket::readPendingDatagrams() {
packet->getDataSize(),
packet->getPayloadSize())) {
// the connection could not be created or indicated that we should not continue processing this packet
#ifdef UDT_CONNECTION_DEBUG
qCDebug(networking) << "Bad packet version" << (unsigned int)NLPacket::versionInHeader(*packet)
<< ", type" << NLPacket::typeInHeader(*packet);
#endif
continue;
}
}