Updated logging on NotSslRecordException
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / core / OFFrameDecoder.java
index d074e93e5a70f0f2d6c1f40c8a4d4273d344a487..7e62347524b0a6f714d436b756d9564ae7311dc9 100644 (file)
@@ -44,7 +44,12 @@ public class OFFrameDecoder extends ByteToMessageDecoder {
 
     @Override
     public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
-        LOGGER.warn("Unexpected exception from downstream.", cause);
+        if (cause instanceof io.netty.handler.ssl.NotSslRecordException) {
+            LOGGER.warn("Not an TLS record exception - please verify TLS configuration.");
+        } else {
+            LOGGER.warn("Unexpected exception from downstream.", cause);
+        }
+        LOGGER.warn("Closing connection.");
         ctx.close();
     }