attempt to bypass setting port if socket is provided