Skip to content

handle double client removal by logging instead of panicking#33

Merged
plebhash merged 1 commit intomainfrom
dirty-unwrap
Aug 15, 2025
Merged

handle double client removal by logging instead of panicking#33
plebhash merged 1 commit intomainfrom
dirty-unwrap

Conversation

@lucasbalieiro
Copy link
Copy Markdown
Collaborator

closes #32

Previously, remove_client would panic if called twice for the same client_id,
because the second call would unwrap a None when looking up the client.

Logs show that remove_client can be triggered twice when the Template
Provider disconnects, likely due to sv2-services invoking it from multiple
paths.
Now if the client is not found, log ("Client X not found — assuming already dropped") instead
of panicking.

@plebhash
Copy link
Copy Markdown
Collaborator

fixed via 0ac0dfe + plebhash/sv2-services@2be0a68

@plebhash plebhash closed this Aug 15, 2025
@plebhash plebhash reopened this Aug 15, 2025
@plebhash
Copy link
Copy Markdown
Collaborator

actually, still good to get rid of the unwrap

@plebhash plebhash merged commit 4f445f9 into main Aug 15, 2025
6 checks passed
@plebhash plebhash deleted the dirty-unwrap branch August 15, 2025 19:11
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.

panic due to dirty unwrap

2 participants