fix tcp port selection on EADDRINUSE