fix the deprecated function NetUtils.getServerAddress