alb3rtobr commented on a change in pull request #5970:
URL: https://github.com/apache/geode/pull/5970#discussion_r578361825



##########
File path: 
geode-core/src/main/java/org/apache/geode/distributed/internal/direct/DirectChannel.java
##########
@@ -142,7 +143,23 @@ public DirectChannel(Membership<InternalDistributedMember> 
mgr,
       props.setProperty("membership_port_range_start", "" + range[0]);
       props.setProperty("membership_port_range_end", "" + range[1]);
 
-      this.conduit = new TCPConduit(mgr, port, address, isBindAddress, this, 
bufferPool, props);
+      InetAddress conduitAddress = address;
+      if (!dc.getMembershipBindAddress().isEmpty()) {
+        try {
+          if (dc.getMembershipBindAddress().equals("*")) {
+            conduitAddress = (new InetSocketAddress(0)).getAddress();
+          } else {
+            conduitAddress = 
InetAddress.getByName(dc.getMembershipBindAddress());
+          }
+        } catch (UnknownHostException e) {
+          logger.error("Exception when configuring " + 
dc.getMembershipBindAddress()

Review comment:
       > Are you sure that `getMessage()` for `UnknownHostException` returns 
the `default address`?
   
   I was not trying to print the default address, but the text of the 
exception. I think the way I wrote the exception can make someone think I 
wanted to print the default address... I will modify it.




----------------------------------------------------------------
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:
[email protected]


Reply via email to