protected against cases where the channels are null and asking for stats
This commit is contained in:
parent
745b8cbefe
commit
80f9ea5bfe
|
@ -257,7 +257,8 @@ public class NettyHttpServerTransport extends AbstractLifecycleComponent<HttpSer
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public HttpStats stats() {
|
@Override public HttpStats stats() {
|
||||||
return new HttpStats(serverOpenChannels.numberOfOpenChannels());
|
OpenChannelsHandler channels = serverOpenChannels;
|
||||||
|
return new HttpStats(channels == null ? 0 : channels.numberOfOpenChannels());
|
||||||
}
|
}
|
||||||
|
|
||||||
void dispatchRequest(HttpRequest request, HttpChannel channel) {
|
void dispatchRequest(HttpRequest request, HttpChannel channel) {
|
||||||
|
|
|
@ -443,7 +443,8 @@ public class NettyTransport extends AbstractLifecycleComponent<Transport> implem
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public TransportStats stats() {
|
@Override public TransportStats stats() {
|
||||||
return new TransportStats(serverOpenChannels.numberOfOpenChannels());
|
OpenChannelsHandler channels = serverOpenChannels;
|
||||||
|
return new TransportStats(channels == null ? 0 : channels.numberOfOpenChannels());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public <T extends Streamable> void sendRequest(final DiscoveryNode node, final long requestId, final String action, final Streamable message, TransportRequestOptions options) throws IOException, TransportException {
|
@Override public <T extends Streamable> void sendRequest(final DiscoveryNode node, final long requestId, final String action, final Streamable message, TransportRequestOptions options) throws IOException, TransportException {
|
||||||
|
|
Loading…
Reference in New Issue