refactor: separate session responsibilities and inject dependencies
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled

This commit is contained in:
2025-11-28 13:29:43 +07:00
parent 9c4ac732ee
commit d3a5007d68
6 changed files with 521 additions and 360 deletions

View File

@ -75,7 +75,7 @@ func (pm *PortManager) SetPortStatus(port uint16, assigned bool) error {
defer pm.mu.Unlock()
if _, exists := pm.ports[port]; !exists {
return fmt.Errorf("port %d is not in the allowed range", port)
return fmt.Errorf("port %d already in use", port)
}
pm.ports[port] = assigned
return nil