refactor: consolidate error handling with fail() function in session handlers

- Replace repetitive error handling code with fail() function in HandleGlobalRequest
- Standardize error response pattern across all handler methods
- Improve code maintainability and reduce duplication
This commit is contained in:
2026-01-12 14:42:42 +07:00
parent da29df85b7
commit fb638636bf
2 changed files with 86 additions and 140 deletions
-1
View File
@@ -74,7 +74,6 @@ func (pm *manager) GetUnassignedPort() (uint16, bool) {
for _, port := range pm.sortedPorts {
if !pm.ports[port] {
pm.ports[port] = true
return port, true
}
}