You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/02/18 12:03:05 UTC

[GitHub] [geode] alb3rtobr commented on a change in pull request #5970: GEODE-8877: Configurable membership bind address

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:
users@infra.apache.org