// suspend the receives we will resume once we are ready
webSocketChannel.suspendReceives();
ChannelListener<StreamSourceChannel> listener;
FrameHandler handler = session.getFrameHandler();
if (handler == null) {
// no handler defined by the user use the default listener which takes care
// of echo back PING and CLOSE Frame to be RFC compliant
listener = defaultListener;
} else if (handler instanceof AssembledFrameHandler) {