Merge pull request #14574 from zfox23/MS17811_fixFrozeNAgain

Fix a bug introduced in PR14566, actually fixing MS17811
This commit is contained in:
Zach Fox 2018-12-13 13:34:04 -08:00 committed by GitHub
commit 3a1f834576
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -395,8 +395,14 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node)
}
// If Avatar A's PAL WAS open but is no longer open, AND
// Avatar A should be ignoring Avatar B...
if (PALWasOpen && !PALIsOpen && shouldIgnore) {
// Avatar A is ignoring Avatar B OR Avatar B is ignoring Avatar A...
//
// This is a bit heavy-handed still - there are cases where a kill packet
// will be sent when it doesn't need to be (but where it _should_ be OK to send).
// However, it's less heavy-handed than using `shouldIgnore`.
if (PALWasOpen && !PALIsOpen &&
(destinationNode->isIgnoringNodeWithID(avatarNode->getUUID()) ||
avatarNode->isIgnoringNodeWithID(destinationNode->getUUID()))) {
// ...send a Kill Packet to Node A, instructing Node A to kill Avatar B,
// then have Node A cleanup the killed Node B.
auto packet = NLPacket::create(PacketType::KillAvatar, NUM_BYTES_RFC4122_UUID + sizeof(KillAvatarReason), true);