Skip to content
This repository has been archived by the owner on Apr 22, 2018. It is now read-only.

[libbpmclient] Old received message on receive buffer #107

Open
lerwys opened this issue Sep 30, 2015 · 1 comment
Open

[libbpmclient] Old received message on receive buffer #107

lerwys opened this issue Sep 30, 2015 · 1 comment
Labels

Comments

@lerwys
Copy link
Contributor

lerwys commented Sep 30, 2015

This problem arises from the fact that, sometimes, we give up too soon from waiting the received message. Most of the time, the message is just a bit delayed, causing the client prematurely abort the operation.

However, due to the asynchronous nature of libbpmclient, the message will arrive (eventually) and be put in the receive buffer.

On the following operation, even if the message arrives on time, there will be an earlier message in the buffer which will be mistakenly detected as the message for the current operation.

A possibility to handle this would be to use a single client instance per thread and add more information to the reply packet. For instance we could have the operation number which this reply belongs to and a sequence number to avoid detecting an earlier (and handled) message.

@lerwys lerwys added the bug label Sep 30, 2015
lerwys added a commit to lnls-dig/bpm-epics-ioc that referenced this issue Sep 30, 2015
This problem arises from the fact that, sometimes,
we give up too soon from waiting the received message.
Most of the time, the message is just a bit delayed,
causing the client prematurely abort the operation.

However, due to the asynchronous nature of libbpmclient,
the message will arrive (eventually) and be put in the
receive buffer.

On the following operation, even if the message arrives
on time, there will be an earlier message in the buffer
which will be mistakenly detected as the message for the
current operation.

A possibility to handle this would be to use a single
client instance per thread and add more information to
the reply packet. For instance we could have the operation
number which this reply belongs to and a sequence number
to avoid detecting an earlier (and handled) message.

This is related to github issue #3 and lnls-dig/bpm-sw#107
@lerwys
Copy link
Contributor Author

lerwys commented Feb 24, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant