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); }
private void HardProtocolExceptionHandler(HardProtocolException hpe) { if (SetCloseReason(hpe.ShutdownReason)) { OnShutdown(hpe.ShutdownReason); _session0.SetSessionClosing(false); try { _session0.Transmit(new OutgoingCommand(new ConnectionClose(hpe.ShutdownReason.ReplyCode, hpe.ShutdownReason.ReplyText, 0, 0))); ClosingLoop(); } catch (IOException ioe) { LogCloseError("Broker closed socket unexpectedly", ioe); } } else { LogCloseError("Hard Protocol Exception occurred while closing the connection", hpe); } }