Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JGRP-2805 GossipRouter NPE on startup #802

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/org/jgroups/stack/GossipRouter.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,6 @@ public GossipRouter start() throws Exception {
if(jmx)
JmxConfigurator.register(this, Util.getMBeanServer(), "jgroups:name=GossipRouter");

if(diag.isEnabled()) {
StackType ip_version=bind_addr instanceof Inet6Address? StackType.IPv6 : StackType.IPv4;
Configurator.setDefaultAddressValues(diag, ip_version);
diag.start();
}
// Creating the DiagnosticsHandler _before_ the TLS socket factory makes the former use regular sockets;
// if this was not the case, Probe would have to be extended to use SSLSockets, too
if(tls.enabled()) {
Expand All @@ -222,6 +217,13 @@ public GossipRouter start() throws Exception {
.addConnectionListener(this)
.connExpireTimeout(expiry_time).reaperInterval(reaper_interval).linger(linger_timeout);
server.start();

if(diag.isEnabled()) {
ryanemerson marked this conversation as resolved.
Show resolved Hide resolved
StackType ip_version=bind_addr instanceof Inet6Address? StackType.IPv6 : StackType.IPv4;
Configurator.setDefaultAddressValues(diag, ip_version);
diag.start();
}

Runtime.getRuntime().addShutdownHook(new Thread(GossipRouter.this::stop));
return this;
}
Expand Down