&& (transportSession = session.getTransportSession()).isLocalChannelSet()
&& !hasSendableMessages(session)
&& !_isCloseSent)
{
int channel = freeLocalChannel(transportSession);
End end = new End();
ErrorCondition localError = endpoint.getCondition();
if( localError.getCondition() !=null )
{
end.setError(localError);
}
writeFrame(channel, end, null, null);
endpoint.clearModified();
}