Skip to content

fix(Teleport): discard delayed requests on disconnect - #9366

Merged
MukjepScarlet merged 2 commits into
CCBlueX:nextgenfrom
c8dhjp4tyv-bit:fix/teleport-disconnect-state
Oct 7, 2026
Merged

MukjepScarlet merged 2 commits into
CCBlueX:nextgenfrom
c8dhjp4tyv-bit:fix/teleport-disconnect-state

Conversation

@c8dhjp4tyv-bit

Copy link
Copy Markdown
Contributor

Disconnecting while a delayed teleport is armed leaves the module enabled with the previous connection's destination and correction counter. Position corrections after joining another world can execute that old request.

Opt into the existing disableOnQuit lifecycle so onDisabled() clears the pending request before leaving the world. Adds a client regression for disconnect/rejoin, subsequent position corrections and a fresh delayed request in the new connection.

Related to #9327, finding E.

Validation: build and client game tests passed. The added regression also fails for its intended reason on unmodified sources.

@liquidbounce-support-bot

Copy link
Copy Markdown
Contributor

Thanks for this — the state carry-over between connections is a real gap, and opting into the existing disableOnQuit lifecycle is a nicely minimal fix. The regression covers the important parts (queued request dropped on quit, later corrections inert after rejoin, and a fresh request in the new connection still completing), and linking the run that fails on unmodified sources is appreciated. Related: #9327 (finding E).

One review point: the diff itself only flips the flag, so it relies on onDisabled() already clearing both the destination and the correction counter — worth stating that explicitly in the PR description so a reviewer doesn't have to trace it.

Docs impact looks nil: the Teleport page still describes the module as command-driven and its settings are unchanged, though you may want a sentence there about the queued request not surviving a disconnect. A maintainer will take it from here.


🤖 Automated support reply — a human maintainer will review if this doesn't help.

onDisabled() is now also reached by quitting, so the disabler armed by
WithDisablerOnWait needs the same release the position packet handler does.
The useCommand path queues its auto disable instead: mc.execute runs inline on
the game thread and is defeated by the enabled value not being committed yet.
@MukjepScarlet
MukjepScarlet merged commit 784a9c6 into CCBlueX:nextgen Oct 7, 2026
6 checks passed
@c8dhjp4tyv-bit
c8dhjp4tyv-bit deleted the fix/teleport-disconnect-state branch October 7, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants