Technoboy- edited a comment on pull request #1382:
URL: 
https://github.com/apache/shardingsphere-elasticjob/pull/1382#issuecomment-675254029


   On the face of it, InetAddress.getLocalHost() should give you the IP address 
of this host. The problem is that a host could have lots of network interfaces, 
and an interface could be bound to more than one IP address. And to top that, 
not all IP addresses will be reachable outside of your machine or LAN. For 
example, they could be IP addresses for virtual network devices, private 
network IP addresses, and so on.
   What this means is that the IP address returned by 
InetAddress.getLocalHost() might not be the right one to use.
   So the current implementation looks nice.
   BTW, reference to [Code of 
Conduct](https://shardingsphere.apache.org/community/en/contribute/code-conduct/)
 for pull request. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to