This closes #189 on Log Poodle WARN

This commit is contained in:
Clebert Suconic 2015-03-31 11:52:31 -04:00
commit ce0c3d9e63
1 changed files with 8 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture; import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import io.netty.bootstrap.ServerBootstrap; import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.Channel; import io.netty.channel.Channel;
@ -347,6 +348,8 @@ public class NettyAcceptor implements Acceptor
context = null; // Unused context = null; // Unused
} }
final AtomicBoolean warningPrinted = new AtomicBoolean(false);
ChannelInitializer<Channel> factory = new ChannelInitializer<Channel>() ChannelInitializer<Channel> factory = new ChannelInitializer<Channel>()
{ {
@Override @Override
@ -404,12 +407,16 @@ public class NettyAcceptor implements Acceptor
for (String s : protocols) for (String s : protocols)
{ {
if (s.equals("SSLv3") || s.equals("SSLv2Hello")) if (s.equals("SSLv3") || s.equals("SSLv2Hello"))
{
if (!warningPrinted.get())
{ {
ActiveMQServerLogger.LOGGER.disallowedProtocol(s); ActiveMQServerLogger.LOGGER.disallowedProtocol(s);
}
continue; continue;
} }
set.add(s); set.add(s);
} }
warningPrinted.set(true);
engine.setEnabledProtocols(set.toArray(new String[0])); engine.setEnabledProtocols(set.toArray(new String[0]));
SslHandler handler = new SslHandler(engine); SslHandler handler = new SslHandler(engine);