@@ -114,18 +114,13 @@ public class GossipRouter extends ReceiverAdapter implements ConnectionListener,
114
114
-> System .out .printf ("dst=%s src=%s (%d bytes): hdrs= %s\n " , msg .dest (), msg .src (), msg .getLength (), msg .printHeaders ());
115
115
116
116
117
- public GossipRouter (String bind_addr , int local_port ) {
117
+ public GossipRouter (String bind_addr , int local_port ) throws Exception {
118
118
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 ();
126
121
}
127
122
128
- public GossipRouter (InetAddress bind_addr , int local_port ) {
123
+ public GossipRouter (InetAddress bind_addr , int local_port ) throws Exception {
129
124
this .port =local_port ;
130
125
this .bind_addr =bind_addr ;
131
126
init ();
@@ -181,11 +176,12 @@ public int numRegisteredClients() {
181
176
}
182
177
183
178
184
- public GossipRouter init () {
179
+ public GossipRouter init () throws Exception {
185
180
diag =new DiagnosticsHandler (log , socket_factory , thread_factory )
186
181
.registerProbeHandler (this )
187
182
.printHeaders (b -> String .format ("GossipRouter [addr=%s, cluster=GossipRouter, version=%s]\n " ,
188
183
localAddress (), Version .description ));
184
+ tls .init ();
189
185
return this ;
190
186
}
191
187
0 commit comments