Duplicate receive id

I found that MsgReceive() can return a duplicate receive id in the following
scenario:
server MsgReceive()
clientA MsgSend()
server MsgReceive() returns rcvid #1
server MsgReceive()
clientA terminates abnormally
clientB MsgSend()
server MsgReceive() returns rcvid #2
here rcvid #1 and rcvid #2 are the same
Is this expected behaviour? I assumed rcvids are unique.

Thanks,
Shaun

Shaun Jackman <sjackman@nospam.vortek.com> wrote:

I found that MsgReceive() can return a duplicate receive id in the following
scenario:
server MsgReceive()
clientA MsgSend()
server MsgReceive() returns rcvid #1
server MsgReceive()
clientA terminates abnormally
clientB MsgSend()
server MsgReceive() returns rcvid #2
here rcvid #1 and rcvid #2 are the same
Is this expected behaviour? I assumed rcvids are unique.

Yup – are you using the resource manager framework? You’ll need to
study up on the _MI_UNBLOCK_REQ flag and handle the _IO_CLOSE message…
This message should occur during the “clientA terminates abnormally”
part of the interaction… It’s up to you to clean up and terminate
any outstanding requests. If I may make a shameless plug, it’s in
my book, page 152+ :slight_smile:

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.