socket: fix issue with baseURI and port Reconnect to AMD

fixes #17661