Skip to content

Commit 894fd36

Browse files
committed
GossipRouter.init() -> TLS.init()
1 parent 6363b30 commit 894fd36

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/org/jgroups/stack/GossipRouter.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,13 @@ public class GossipRouter extends ReceiverAdapter implements ConnectionListener,
114114
-> System.out.printf("dst=%s src=%s (%d bytes): hdrs= %s\n", msg.dest(), msg.src(), msg.getLength(), msg.printHeaders());
115115

116116

117-
public GossipRouter(String bind_addr, int local_port) {
117+
public GossipRouter(String bind_addr, int local_port) throws Exception {
118118
this.port=local_port;
119-
try {
120-
this.bind_addr=bind_addr != null? InetAddress.getByName(bind_addr) : null;
121-
init();
122-
}
123-
catch(UnknownHostException e) {
124-
log.error("failed setting bind address %s: %s", bind_addr, e);
125-
}
119+
this.bind_addr=bind_addr != null? InetAddress.getByName(bind_addr) : null;
120+
init();
126121
}
127122

128-
public GossipRouter(InetAddress bind_addr, int local_port) {
123+
public GossipRouter(InetAddress bind_addr, int local_port) throws Exception {
129124
this.port=local_port;
130125
this.bind_addr=bind_addr;
131126
init();
@@ -181,11 +176,12 @@ public int numRegisteredClients() {
181176
}
182177

183178

184-
public GossipRouter init() {
179+
public GossipRouter init() throws Exception {
185180
diag=new DiagnosticsHandler(log, socket_factory, thread_factory)
186181
.registerProbeHandler(this)
187182
.printHeaders(b -> String.format("GossipRouter [addr=%s, cluster=GossipRouter, version=%s]\n",
188183
localAddress(), Version.description));
184+
tls.init();
189185
return this;
190186
}
191187

0 commit comments

Comments
 (0)