Closed booky10 closed 2 months ago
My question would be why you didn't opt for the Java Lock class?
I don't see a reason to use locks when we can just use synchronized If you would prefer locks I can change this logic to use locks, but that should not make a difference
Resolves concurrency issues which may happen when sending the same packet wrapper to different players, concurrently
This is not a perfect solution, but the alternative would be refactoring the packetwrapper to be based on buffers passed during encoding as parameters, which would be too much effort and would require breaking changes
Fixes https://github.com/retrooper/packetevents/issues/991