jamdb_oracle
jamdb_oracle copied to clipboard
guard receive functions
We observed in #178 that unexpected messages could cause function_clause errors. By guarding on the expected types we gain some guarantees about the message contents
I'm certainly a novice in erlang. This may not be the right way to resolve this issue. Though, it does appear to fix it for the reproduction we created in #178.
Some thoughts.
- This does not read the message and remove it from the queue. This could lead to messages piling up.
- There are other
receive
calls that I didn't guard. I can try to drive out a case where these occur. However, I wanted to see if this approach makes sense before spending more time on this.