[TensorPipe] Guess IP addr in separate function (#39397)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39397
I said I'd do it in a previous diff, but then I forgot, so here it is.
ghstack-source-id: 105088619
Test Plan: No functional changes
Differential Revision: D21838464
fbshipit-source-id: 74fbe76c7ce879b28c50fd29feecd9f4d71fc44c