aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-06-12Remove accidental timeout left in during earlier debugging. Has been in ↵Justin Clark-Casey (justincc)1-1/+1
since two commits ago (b099f26)
2012-06-12Set IClientAPI.IsActive = false early on client removal due to ack timeout ↵Justin Clark-Casey (justincc)1-29/+35
rather than using IsLoggingOut flag. IsActive is more appropriate since unack timeout is not due to voluntary logout. This is in line with operations such as manual kick that do not set the IsLoggingOut flag. It's also slightly better race-wise since it reduces the chance of this operation clashing with another reason for client deactivation (e.g. manual kick).
2012-06-12If the simulator closes a root agent due to ack timeout, then send the ↵Justin Clark-Casey (justincc)1-2/+20
client a kick message with that reason, in case it is somehow still listening.
2012-06-08Instead of retrieving the known client again in LLUDPServer.RemoveClient(), ↵Justin Clark-Casey (justincc)1-21/+10
check the IsLoggingOut flag instead. This is slightly better thread-race wise
2012-06-08If logging a client out due to ack timeout, do this asynchronously rather ↵Justin Clark-Casey (justincc)1-8/+18
than synchronously on the outgoing packet loop. This is the same async behaviour as normal logouts. This is necessary because the event queue will sleep the thread for 5 seconds on an ack timeout logout as the client isn't around to pick up the final event queue messages.
2012-06-08Add regression test for client logout due to ack timeout.Justin Clark-Casey (justincc)1-4/+6
2012-06-08Remove null checks at top of LLUDPServer.ProcessInPacket(). Neither packet ↵Justin Clark-Casey (justincc)1-8/+1
nor client are ever null.
2012-06-08Store already retrieve IClientAPI in IncomingPacket structure for later use ↵Justin Clark-Casey (justincc)1-13/+13
rather than doing another retrieve on dequeue. Instead of checking whether the client still exists by trying to retrieve again from the client manager, this patch gets it back from IncomingPacket and checks the IClientAPI.IsActive state.
2012-06-07Log warning if we try to remove a UDP client that has already been removed.Justin Clark-Casey (justincc)1-0/+6
2012-06-07Allow the thread watchdog to accept an alarm method that is invoked if the ↵Justin Clark-Casey (justincc)1-5/+64
timeout is breached. This alarm can then invoke this to log extra information. This is used in LLUDPServer to show which client was being processed when incoming and outgoing udp watchdog alarms are triggered.
2012-06-05Mantis 4597 AgentPaused packet is ignored.Talun1-3/+15
The packet was actually being handled but not acted on. This change extends the default timeout for paused clients to 5 minutes and makes both the paused and non-paused timeout periods configurable.
2012-04-26Tweak log messages on local region to region teleport path to help with ↵Justin Clark-Casey (justincc)1-1/+3
problem resolution.
2012-04-26minor: Add region name to dropped inbound packet messageJustin Clark-Casey (justincc)1-1/+3
2012-02-24Stop spurious scene loop startup timeout alarms for scenes with many prims.Justin Clark-Casey (justincc)1-2/+5
On the first frame, all startup scene objects are added to the physics scene. This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame. This commit also slightly changes the behaviour of timeout reporting. Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check. Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
2012-02-16Correct a bug introduced in 1f402fdf (Feb 7 2012) where the delete friends ↵Justin Clark-Casey (justincc)1-3/+3
grid call would try and contact the wrong uri. Also fixes the build from df960d5
2012-02-16Add known identity informatio nto log message if an exception is thrown ↵Justin Clark-Casey (justincc)1-36/+53
during LLUDPServer.HandleUseCircuitCode()
2012-01-24Fix "Abnormal client thread terminations" stat in period CONNECTION ↵Justin Clark-Casey (justincc)1-0/+1
STATISTICS to count the number of times clients are disconnected due to ack timeouts. This has been broken for a long period and would only ever show 0.
2011-12-08Don't reply with an ack packet if the client is not authorized.Justin Clark-Casey (justincc)1-42/+29
2011-12-08Extend TestAddClient() to check that the first packet received is an ack packetJustin Clark-Casey (justincc)1-1/+15
2011-12-08Reactivate BasicCircuitTests.TestAddClient()Justin Clark-Casey (justincc)1-1/+19
This checks that the initial UseCircuitCode packet is handled correctly for a normal client login.
2011-12-08Remove unnecessary AgentCircuitData null check from Scene.AddNewClient().Justin Clark-Casey (justincc)1-4/+4
The only caller is the LLUDP stack and this has to validate the UDP circuit itself, so we know that it exists. This allows us to eliminate another null check elsewhere and simplifies the method contract
2011-12-08On a new client circuit, send the initial reply ack to let the client know ↵Justin Clark-Casey (justincc)1-19/+39
it's live before sending other data. This means that avatar/appearance data of other avatars and scene objects for a client will be sent after the ack rather than possibly before. This may stop some avatars appearing grey on login. This introduces a new OpenSim.Framework.ISceneAgent to accompany the existing OpenSim.Framework.ISceneObject and ISceneEntity This allows IClientAPI to handle this as it can't reference OpenSim.Region.Framework.Interfaces
2011-10-12Improve some method doc for LLUDPClient, LLUDPServer and UnackedPacketCollectionJustin Clark-Casey (justincc)1-4/+13
2011-10-03Remove vestigal RegionStatus.SlaveScene.Justin Clark-Casey (justincc)1-15/+7
This appears to be code clutter since the code that uses this has long gone.
2011-07-27Ensure that packet headers get parsed correctlyMelanie1-0/+29
2011-04-30First stab at cleaning up Caps. Compiles. Untested.Diva Canto1-0/+0
2011-04-21Refactor UnackedPacketCollection so ProcessQueues will handle Adds, Acks, ↵Dan Lake1-2/+2
and Removes in that order.
2011-04-20bug fix. Now when an unacked update packet is handled through ↵Dan Lake1-2/+2
ResendPrimUpdates, it is removed from the UnackedPacketCollection.
2011-04-19Requeue unacknowledged entity updates rather than resend then "as is".Dan Lake1-32/+32
Often, by the time the UDPServer realizes that an entity update packet has not been acknowledged, there is a newer update for the same entity already queued up or there is a higher priority update that should be sent first. This patch eliminates 1:1 packet resends for unacked entity update packets. Insteawd, unacked update packets are decomposed into the original entity updates and those updates are placed back into the priority queues based on their new priority but the original update timestamp. This will generally place them at the head of the line to be put back on the wire as a new outgoing packet but prevents the resend queue from filling up with multiple stale updates for the same entity. This new approach takes advantage of the UDP nature of the Linden protocol in that the intent of a reliable update packet is that if it goes unacknowledge, SOMETHING has to happen to get the update to the client. We are simply making sure that we are resending current object state rather than stale object state. Additionally, this patch includes a generalized callback mechanism so that any caller can specify their own method to call when a packet expires without being acknowledged. We use this mechanism to requeue update packets and otherwise use the UDPServer default method of just putting expired packets in the resend queue.
2011-04-18Requeue unacknowledged entity updates rather than resend then "as is".Dan Lake1-32/+32
Often, by the time the UDPServer realizes that an entity update packet has not been acknowledged, there is a newer update for the same entity already queued up or there is a higher priority update that should be sent first. This patch eliminates 1:1 packet resends for unacked entity update packets. Insteawd, unacked update packets are decomposed into the original entity updates and those updates are placed back into the priority queues based on their new priority but the original update timestamp. This will generally place them at the head of the line to be put back on the wire as a new outgoing packet but prevents the resend queue from filling up with multiple stale updates for the same entity. This new approach takes advantage of the UDP nature of the Linden protocol in that the intent of a reliable update packet is that if it goes unacknowledge, SOMETHING has to happen to get the update to the client. We are simply making sure that we are resending current object state rather than stale object state. Additionally, this patch includes a generalized callback mechanism so that any caller can specify their own method to call when a packet expires without being acknowledged. We use this mechanism to requeue update packets and otherwise use the UDPServer default method of just putting expired packets in the resend queue.
2011-04-13New tokenbucket algorithm. This one provides fair sharing of the queuesMic Bowman1-1/+1
when client and simulator throttles are set. This algorithm also uses pre-defined burst rate of 150% of the sustained rate for each of the throttles. Removed the "state" queue. The state queue is not a Linden queue and appeared to be used just to get kill packets sent.
2011-04-12New tokenbucket algorithm. This one provides fair sharing of the queuesMic Bowman1-1/+1
when client and simulator throttles are set. This algorithm also uses pre-defined burst rate of 150% of the sustained rate for each of the throttles. Removed the "state" queue. The state queue is not a Linden queue and appeared to be used just to get kill packets sent.
2011-04-11New tokenbucket algorithm. This one provides fair sharing of the queuesMic Bowman1-1/+1
when client and simulator throttles are set. This algorithm also uses pre-defined burst rate of 150% of the sustained rate for each of the throttles. Removed the "state" queue. The state queue is not a Linden queue and appeared to be used just to get kill packets sent.
2011-02-18minor: remove mono compiler warningJustin Clark-Casey (justincc)1-1/+1
2011-02-09Put the Ack of UseCircuitCode back to where it used to be. Some ppl are ↵Diva Canto1-6/+5
reporting login issues.
2011-02-09Comment instrumentation out. Not needed anymore. Left in comments, in case ↵Diva Canto1-4/+7
it is needed again. Mantis #5365
2011-02-09Revert "Brute-force debug -- mantis #5365"Diva Canto1-5/+0
This reverts commit 585473aade100c3ffeef27e0c8e6b6c8c09d0109.
2011-02-08Brute-force debug -- mantis #5365Diva Canto1-0/+5
2011-02-08Avoid potential race conditions on UseCircuitCode. I artificially made the ↵Diva Canto1-23/+28
race condition happen, and got very similar results to those described in mantis #5365 -- no prims/avie sent back.
2011-02-08Minor addition to the previous commitDiva Canto1-3/+12
2011-02-08Minor improvement to previous commit.Diva Canto1-2/+4
2011-02-08Added emergency monitoring of UDP Outgoing packets thread. Just type ↵Diva Canto1-0/+100
"emergency-monitoring on/off"
2011-02-02Record number of resent packets in LindenUDP stack and display in stats reportJustin Clark-Casey (justincc)1-1/+4
2011-01-21implement "show throttles" command for showing current agent throttles and ↵Justin Clark-Casey (justincc)1-3/+5
the server settings. This is in a very crude state, currently. The LindenUDPModule was renamed LindenUDPInfoModule and moved to OptionalModules OptionalModules was given a direct reference to OpenSim.Region.ClientStack.LindenUDP so that it can inspect specific LindenUDP settings without having to generalize those to all client views (some of which may have no concept of the settings involved). This might be ess messy if OpenSim.Region.ClientStack.LindenUDP were a region module instead, like MXP, IRC and NPC
2011-01-18Prune some of the excess logging for client logins.Justin Clark-Casey (justincc)1-3/+3
Didn't touch the appearance related stuff.
2011-01-17Fix UnackedBytes client stack statistic as seen in "show queues"Justin Clark-Casey (justincc)1-2/+0
Bytes were being wrongly added again on a resend
2011-01-05Commented a verbose Debug message in LLUDPServer that got uncommented at ↵Diva Canto1-1/+1
some point.
2010-12-02Stop LLUDPServer sending updates after object deletes by always queueing deletesJustin Clark-Casey (justincc)1-2/+6
If an LL 1.23.5 client (and possibly earlier and later) receives an object update after a kill object packet, it leaves the deleted prim in the scene until client relog This is possible in LLUDPServer if an object update packet is queued but a kill packet sent immediately. Beyond invasive tracking of kill sending, most expedient solution is to always queue kills, so that they always arrive after updates. In tests, this doesn't appear to affect performance. There is probably still an issue present where an update packet might not be acked and then resent after the kill packet.
2010-12-02minor: add some method docJustin Clark-Casey (justincc)1-0/+14
2010-11-08Formatting cleanup.Jeff Ames1-2/+2