From f13836b84626a1ddecae184ae39d84bd69352693 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 13 Feb 2021 11:59:38 +0000 Subject: [PATCH] try tune keepalive on region agent create --- OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 72b59bd7e2..dac49a896b 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -455,8 +455,7 @@ namespace OpenSim.Server.Handlers.Simulation resp["features"] = featuresWanted; - if(result) - httpResponse.KeepAlive = true; + httpResponse.KeepAlive = result; // We must preserve defaults here, otherwise a false "success" will not be put into the JSON map! httpResponse.RawBuffer = Util.UTF8.GetBytes(OSDParser.SerializeJsonString(resp, true)); @@ -539,7 +538,7 @@ namespace OpenSim.Server.Handlers.Simulation OSDMap resp = new OSDMap(2); string reason = string.Empty; - bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, data.fromLogin, ctx, out reason); + bool result = CreateAgent(source, gatekeeper, destination, aCircuit, data.flags, ctx, out reason); resp["reason"] = OSD.FromString(reason); resp["success"] = OSD.FromBoolean(result); @@ -548,6 +547,7 @@ namespace OpenSim.Server.Handlers.Simulation httpResponse.StatusCode = (int)HttpStatusCode.OK; httpResponse.RawBuffer = Util.UTF8.GetBytes(OSDParser.SerializeJsonString(resp)); + httpResponse.KeepAlive = (data.flags & (uint)(TeleportFlags.ViaLogin | TeleportFlags.ViaHGLogin)) != (uint)TeleportFlags.ViaLogin; } protected virtual AgentDestinationData CreateAgentDestinationData() @@ -586,7 +586,7 @@ namespace OpenSim.Server.Handlers.Simulation // subclasses can override this protected virtual bool CreateAgent(GridRegion source, GridRegion gatekeeper, GridRegion destination, - AgentCircuitData aCircuit, uint teleportFlags, bool fromLogin, EntityTransferContext ctx, out string reason) + AgentCircuitData aCircuit, uint teleportFlags, EntityTransferContext ctx, out string reason) { reason = string.Empty; bool ret = m_SimulationService.CreateAgent(source, destination, aCircuit, teleportFlags, ctx, out reason);