Description
The condition if (port) treats port 0 as falsy, causing it to bypass port validation and call getFreePort() instead. Port 0 is a valid network port (meaning 'any available port'), but this logic incorrectly treats it as 'no port specified'. Users explicitly configuring port 0 will get unexpected behavior.
Severity: medium
File: src/configuration/utils.ts
Expected Behavior
The code should handle this case properly to avoid unexpected errors or degraded quality.