mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-30 20:08:29 +00:00
use ip address if possible when serializing inet socket transport information
This commit is contained in:
parent
d964f10bbe
commit
f6d4654daa
1
modules/elasticsearch/src/main/java/org/elasticsearch/util/transport/InetSocketTransportAddress.java
1
modules/elasticsearch/src/main/java/org/elasticsearch/util/transport/InetSocketTransportAddress.java
@ -70,6 +70,7 @@ public class InetSocketTransportAddress implements TransportAddress {
|
||||
}
|
||||
|
||||
@Override public void writeTo(StreamOutput out) throws IOException {
|
||||
// prefer host address if possible, better than hostname (for example, on rackspace cloud)
|
||||
if (address.getAddress() != null) {
|
||||
if (address.getAddress().getHostAddress() != null) {
|
||||
out.writeUTF(address.getAddress().getHostAddress());
|
||||
|
Loading…
x
Reference in New Issue
Block a user