Fix transaction identifier collision#157
Conversation
|
Shouldn't the response be ignored if the transaction id is different, instead of throwing an exception? Throwing will result in no data being read and thus data loss. |
|
The data loss will also occur, if we just ignore the response. With an exception at least we know about that and also reconnection could happen. |
|
It would require a larger change, but you could keep in memory the responses for the different transaction id's, waiting until the response for "your" id is received, and then continue. Out of order responses are a part of the protocol, so this does not indicate a "bad" connection, so a reconnect is not necessary. |
|
I ran into the same problem today. This should handle multiple requests fine. Also a configurable semaphoreSlim to limit the max concurrency for some embedded devices |
It's a fix for the #146 issue. If the two transaction ID is the same, it throws an error and rebuilds the connection.