Skip to content

Commit 59a4421

Browse files
douglaspalmerrcernich
authored andcommitted
[CLOUD-700] Fixed NPE
1 parent 83f1f40 commit 59a4421

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

common/src/main/java/org/openshift/ping/common/server/AbstractServer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ private String getClusterName(final Channel channel) {
8686
}
8787

8888
protected final void handlePingRequest(Channel channel, InputStream stream) throws Exception {
89-
OpenshiftPing handler = (OpenshiftPing) channel.getProtocolStack().findProtocol(OpenshiftPing.class);
90-
handler.handlePingRequest(stream);
89+
if (channel != null) {
90+
OpenshiftPing handler = (OpenshiftPing) channel.getProtocolStack().findProtocol(OpenshiftPing.class);
91+
handler.handlePingRequest(stream);
92+
}
9193
}
9294
}

0 commit comments

Comments
 (0)