_lastWriteFuture.join(LAST_WRITE_FUTURE_JOIN_TIMEOUT);
}
_logger.debug("Closing protocol session");
final CloseFuture future = _minaProtocolSession.close();
// There is no recovery we can do if the join on the close failes so simply mark the connection CLOSED
// then wait for the connection to close.
// ritchiem: Could this release BlockingWaiters to early? The close has been done as much as possible so any
// error now shouldn't matter.
_protocolHandler.getStateManager().changeState(AMQState.CONNECTION_CLOSED);
future.join(LAST_WRITE_FUTURE_JOIN_TIMEOUT);
}