From 8010413e645e1aaf655008e216c017943a5d8c76 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 19 Nov 2016 21:06:42 +0000 Subject: remove some potencial null refs i did add in last days :( --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 8 ++++++-- OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 3 --- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 8ba26e8..55d4e39 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -620,7 +620,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_entityProps = null; m_killRecord.Clear(); GroupsInView.Clear(); - m_scene = null; +// m_scene = null; can't do this unless checks are added everywhere due to workitems already in pools + //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); //GC.Collect(); //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)); @@ -4371,7 +4372,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP ushort timeDilation; - if(m_scene == null) + if(!IsActive) return; timeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); @@ -12945,6 +12946,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// provide your own method. protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting, UnackedPacketMethod method) { + if(!IsActive) + return; + if (m_outPacketsToDrop != null) if (m_outPacketsToDrop.Contains(packet.Type.ToString())) return; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index e85cee2..0efa7c5 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs @@ -299,10 +299,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OnQueueEmpty = null; PendingAcks.Clear(); NeedAcks.Clear(); - NeedAcks = null; - PendingAcks = null; m_nextPackets = null; - m_packetOutboxes = null; } /// -- cgit v1.1