jamdb_oracle icon indicating copy to clipboard operation
jamdb_oracle copied to clipboard

guard receive functions

Open adobley opened this issue 10 months ago • 0 comments

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.

adobley avatar Apr 04 '24 18:04 adobley