Skip to content
This repository has been archived by the owner on Aug 19, 2018. It is now read-only.

Mitigate against a late CompleteMovement retry which is a Bad Thing #421

Merged
merged 2 commits into from
Feb 18, 2018

Conversation

appurist
Copy link
Member

@appurist appurist commented Feb 18, 2018

This may resolve a large number of "login-status-is-completely-screwed" cases, as well as Mantis #3287. This CompleteMovement request is handled with PacketHandlingDisposition.HandleSynchronized however it has an async section at the end, and no protection from queuing up the duplicate request for serial processing once the first call is complete. We're tracking AgentInRegion status here so just avoid resetting it at the start, and instead, use it to recognize the duplicate.

…gs up

This request is handled with
PacketHandlingDisposition.HandleSynchronized however it has an async
section at the end, and no protection from queuing up the duplicate
request for serial processing once the first call is complete. We're
tracking AgentInRegion status here so just avoid resetting it at the
start, and instead, use it to recognize the duplicate.
@appurist appurist changed the title Mitigate against a late CompleteAgent retry which is a Bad Thing Mitigate against a late CompleteMovement retry which is a Bad Thing Feb 18, 2018
…ng AgentInRegion changed

So let's also move the log report outside so that the duplicate and
status is recorded.
Copy link
Contributor

@kf6kjg kf6kjg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I've confirmed that all full assignments to AgentInRegion are to .None, which being the "0" case would be default anyway, and that there are only two calls to CompleteMovement: a direct call in BotManager.cs:278 and as a handler for the client's OnCompleteMovementToRegion event.

@appurist
Copy link
Member Author

I've done the practical run-time tests as well now, with breakpoints, delays etc. and confirmed it is coming in as None and should not be anything but, unless it's a (previously destructive) redundant duplicate call already processed (or still being finished in the async part).

Thanks for the quick review.

@appurist appurist merged commit e13a904 into master Feb 18, 2018
@appurist appurist deleted the duplicate-CompleteAgent branch February 18, 2018 05:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants