CymaticLabs / Unity3D.Amqp

AMQP client library for Unity 3D supporting RabbitMQ
MIT License
97 stars 21 forks source link

Fixes a race condittion due to list allocation #19

Closed mazzus closed 1 year ago

mazzus commented 3 years ago

Cool work! I have stress tested the library a bit and encountered an ArgumentException several times due to the CopyTo function complaining about insufficient length.

I fixed the race condition, which is due to lists being allocated with a count outside the lock. If a new message/error/etc. is received before the code enters the lock, the list will no longer be big enough to hold the new message/error/etc.