InetAddress/getLocalHost throws an exception if local hostname cannot be resolved - and the exception is thrown even if client function is explicitly passed a hostname value!
In such cases, this changes it so the passed hostname argument is honored -- otherwise, we keep hostname as nil.
InetAddress/getLocalHost
throws an exception if local hostname cannot be resolved - and the exception is thrown even ifclient
function is explicitly passed ahostname
value!In such cases, this changes it so the passed
hostname
argument is honored -- otherwise, we keephostname
asnil
.