Skip to content

Fix incorrect dictionary cleanup for binary topics (issue #54)#55

Open
deannaspinks wants to merge 1 commit intogeekscape:masterfrom
deannaspinks:fix/remove-message-handler-binary-cleanup
Open

Fix incorrect dictionary cleanup for binary topics (issue #54)#55
deannaspinks wants to merge 1 commit intogeekscape:masterfrom
deannaspinks:fix/remove-message-handler-binary-cleanup

Conversation

@deannaspinks
Copy link

Correct remove_message_handler() to delete topics from _message_handlers_binary_topics instead of
_message_handlers_wildcard_topics when cleaning up binary non-wildcard handlers.

This prevents a KeyError and ensures internal handler tracking dictionaries remain consistent.

This resolves issue #54

Correct remove_message_handler() to delete topics from
_message_handlers_binary_topics instead of
_message_handlers_wildcard_topics when cleaning up binary
non-wildcard handlers.

This prevents a KeyError and ensures internal handler
tracking dictionaries remain consistent.
Copilot AI review requested due to automatic review settings January 26, 2026 05:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical bug in the remove_message_handler() method where binary topics were being deleted from the wrong internal tracking dictionary, causing a KeyError and leaving the system in an inconsistent state.

Changes:

  • Corrected the dictionary reference in remove_message_handler() to delete from _message_handlers_binary_topics instead of _message_handlers_wildcard_topics when cleaning up binary non-wildcard topic handlers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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