Skip to content

Conversation

Muaz-Ibn-Kamal
Copy link

This pull request refactors manager.go to improve safety, efficiency, and maintainability.

Changes made:

  • Added context parameter to NewSession and EndSession instead of using context.Background
  • Improved session cleanup by deleting session mapping before calling endSession
  • Preallocated slice in AvailableBrokers for better performance
  • Standardized and clarified error messages across methods
  • Normalized username handling in BrokerForUser

These changes make session handling safer, error messages clearer, and overall code more robust.

…ontext parameter to NewSession and EndSession instead of using context.Background - Improved session cleanup by deleting session mapping before calling endSession - Preallocated slice in AvailableBrokers for efficiency - Standardized and clarified error messages - Normalized username handling in BrokerForUser manager.go
@Muaz-Ibn-Kamal Muaz-Ibn-Kamal requested a review from a team as a code owner September 16, 2025 18:57
@adombeck
Copy link
Contributor

These are the same changes as #1082, which I already reviewed, so I'm closing this.

@adombeck adombeck closed this Sep 17, 2025
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