&& !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);