diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 1b81105..3b63bcd 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -899,7 +899,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
899 | client.OnLogout += LogoutHandler; | 899 | client.OnLogout += LogoutHandler; |
900 | 900 | ||
901 | // Start the IClientAPI | 901 | // Start the IClientAPI |
902 | client.Start(); | 902 | // Spin it off so that it doesn't clog up the LLUDPServer |
903 | |||
904 | //First, and very importantly: | ||
905 | // | ||
906 | //Set our DeliverPackets flag in the client to *false* | ||
907 | //this will prevent us from missing important messages | ||
908 | //before the modules are bound | ||
909 | client.DeliverPackets = false; | ||
910 | |||
911 | Util.FireAndForget( | ||
912 | delegate | ||
913 | { | ||
914 | try | ||
915 | { | ||
916 | client.Start(); | ||
917 | } | ||
918 | finally | ||
919 | { | ||
920 | //Now, release the hounds. er, packets. | ||
921 | client.DeliverPackets = true; | ||
922 | } | ||
923 | } | ||
924 | ); | ||
903 | } | 925 | } |
904 | else | 926 | else |
905 | { | 927 | { |
@@ -915,7 +937,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
915 | if (m_scene.TryGetClient(udpClient.AgentID, out client)) | 937 | if (m_scene.TryGetClient(udpClient.AgentID, out client)) |
916 | { | 938 | { |
917 | client.IsLoggingOut = true; | 939 | client.IsLoggingOut = true; |
918 | client.Close(); | 940 | client.Close(false); |
919 | } | 941 | } |
920 | } | 942 | } |
921 | 943 | ||