Skip to content

Net: clear Tor reply state on disconnect#1843

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-correctness-bugs-8c26
Draft

Net: clear Tor reply state on disconnect#1843
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-correctness-bugs-8c26

Conversation

@cursor

@cursor cursor Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

PR intention

Prevent stale Tor control reply callbacks from surviving a control socket disconnect and consuming replies from a later reconnection. Without this cleanup, a Tor restart or control socket drop after queued GETINFO/ADD_ONION commands can leave the controller connected but unauthenticated, with the onion service removed and never restored until process restart.

Code changes brief

Clear the in-progress Tor reply and queued reply handlers whenever TorControlConnection::Disconnect() tears down the bufferevent, so each new control connection starts with an empty reply pipeline.

Open in Web View Automation 

Co-authored-by: Reuben Yap <reuben@firo.org>
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.

1 participant