aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-08-22 21:41:05 +0000
committerJustin Clarke Casey2008-08-22 21:41:05 +0000
commitf0ffbf5b38ad0cea3c906902e262d3c77e201475 (patch)
tree6e6521ce24236f96fe6d06ea79c2da7720515227 /OpenSim
parentbug fixes: (diff)
downloadopensim-SC_OLD-f0ffbf5b38ad0cea3c906902e262d3c77e201475.zip
opensim-SC_OLD-f0ffbf5b38ad0cea3c906902e262d3c77e201475.tar.gz
opensim-SC_OLD-f0ffbf5b38ad0cea3c906902e262d3c77e201475.tar.bz2
opensim-SC_OLD-f0ffbf5b38ad0cea3c906902e262d3c77e201475.tar.xz
* Allow an exception generated in ProcessOutPacket to travel up the stack
* It is dealt with correctly further up, at which point the user is also notified and the failure recorded as a statistic
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs43
1 files changed, 16 insertions, 27 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
index 11cfbd9..209ec36 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketHandler.cs
@@ -745,37 +745,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP
745 } 745 }
746 746
747 // Actually make the byte array and send it 747 // Actually make the byte array and send it
748 try 748 byte[] sendbuffer = packet.ToBytes();
749 {
750 byte[] sendbuffer = packet.ToBytes();
751 749
752 if (packet.Header.Zerocoded) 750 if (packet.Header.Zerocoded)
753 { 751 {
754 int packetsize = Helpers.ZeroEncode(sendbuffer, 752 int packetsize = Helpers.ZeroEncode(sendbuffer,
755 sendbuffer.Length, m_ZeroOutBuffer); 753 sendbuffer.Length, m_ZeroOutBuffer);
756 m_PacketServer.SendPacketTo(m_ZeroOutBuffer, packetsize, 754 m_PacketServer.SendPacketTo(m_ZeroOutBuffer, packetsize,
757 SocketFlags.None, m_Client.CircuitCode); 755 SocketFlags.None, m_Client.CircuitCode);
758 }
759 else
760 {
761 // Need some extra space in case we need to add proxy
762 // information to the message later
763 Buffer.BlockCopy(sendbuffer, 0, m_ZeroOutBuffer, 0,
764 sendbuffer.Length);
765 m_PacketServer.SendPacketTo(m_ZeroOutBuffer,
766 sendbuffer.Length, SocketFlags.None, m_Client.CircuitCode);
767 }
768
769 PacketPool.Instance.ReturnPacket(packet);
770 } 756 }
771 catch (Exception e) 757 else
772 { 758 {
773 m_log.Warn("[client]: " + 759 // Need some extra space in case we need to add proxy
774 "PacketHandler:ProcessOutPacket() - WARNING: Socket "+ 760 // information to the message later
775 "exception occurred - killing thread"); 761 Buffer.BlockCopy(sendbuffer, 0, m_ZeroOutBuffer, 0,
776 m_log.Error(e.ToString()); 762 sendbuffer.Length);
777 m_Client.Close(true); 763 m_PacketServer.SendPacketTo(m_ZeroOutBuffer,
764 sendbuffer.Length, SocketFlags.None, m_Client.CircuitCode);
778 } 765 }
766
767 PacketPool.Instance.ReturnPacket(packet);
779 } 768 }
780 } 769 }
781} 770}