...tatus.
I have a provider which has multiple clients connecting and each requesting a set of RICs. If they overlap (i.e. the 2nd client requests a RIC that the first client is already watching), and the response was a status message (i.e. a price wasn't available), then I attempt to replay a status message using the method below:
public OMMSolicitedItemCmd ReplayStatus(RequestToken requestToken, AttribInfo info)
{
_manager.LogDebugMessage($@Sending stored status for {RIC} to {requestToken.Handle}.);
var attribInfo = info.Clone();
var respMsg = new RespMsg
{
MsgModelType = RDM.MESSAGE_MODEL_TYPES.MMT_MARKET_PRICE,
RespType = RespMsg.RespTypeEnum.Status,
RespStatus = RespStatus,
AttribInfo = attribInfo,
IndicationMask = 0,
RespTypeNum = RDM.INSTRUMENT_UPDATE_RESPONSE_TYPES.INSTRUMENT_UPDATE_UNSPECIFIED
};
var solItemCmd = new OMMSolicitedItemCmd
{
Msg = respMsg,
RequestToken = requestToken
};
return solItemCmd;
}
The original RespStatus came from an initial message returned to the first client, but it doesn't have a clone() method. All the other properties of the constructed RespMsg are simple types (enums etc) except the AttribInfo (which is freshly cloned).
Sometimes, when one of these messages is submitted to the provider, we get an AccessViolation. Any ideas what is causing this?
Thanks, Tony.