This closes #399

This commit is contained in:
Clebert Suconic 2016-02-22 10:47:14 -05:00
commit 2a639cbd86
2 changed files with 6 additions and 0 deletions

View File

@ -426,6 +426,9 @@ public class NettyAcceptor extends AbstractAcceptor {
* @param channel A Netty channel created outside this NettyAcceptor.
*/
public void transfer(Channel channel) {
if (paused || eventLoopGroup == null) {
throw ActiveMQMessageBundle.BUNDLE.acceptorUnavailable();
}
channel.pipeline().addLast(protocolHandler.getProtocolDecoder());
}

View File

@ -365,4 +365,7 @@ public interface ActiveMQMessageBundle {
@Message(id = 119115, value = "Colocated Policy hasn't different type live and backup", format = Message.Format.MESSAGE_FORMAT)
ActiveMQIllegalStateException liveBackupMismatch();
@Message(id = 119116, value = "Netty Acceptor unavailable", format = Message.Format.MESSAGE_FORMAT)
IllegalStateException acceptorUnavailable();
}