public HardProtocolExceptionHandler ( RabbitMQ.Client.Impl.HardProtocolException hpe ) : bool | ||
hpe | RabbitMQ.Client.Impl.HardProtocolException | |
return | bool |
public bool HardProtocolExceptionHandler(HardProtocolException hpe)
{
if (SetCloseReason(hpe.ShutdownReason))
{
OnShutdown();
m_session0.SetSessionClosing(false);
try
{
m_session0.Transmit(ConnectionCloseWrapper(
hpe.ShutdownReason.ReplyCode,
hpe.ShutdownReason.ReplyText));
return true;
} catch (IOException ioe) {
LogCloseError("Broker closed socket unexpectedly", ioe);
}
} else
LogCloseError("Hard Protocol Exception occured "
+ "while closing the connection", hpe);
return false;
}