ZakBerkelaar / MyGame

A WIP multiplayer Terraria like game with a few basic features
GNU General Public License v3.0
0 stars 0 forks source link

Cleanup server code #7

Open ZakBerkelaar opened 3 years ago

ZakBerkelaar commented 3 years ago

The server's code has once again become a mess and should be cleaned up.

ZakBerkelaar commented 2 years ago

While looking over the code I see that in Server.cs there seem to be 2 tasks running handle command. potentially even one per thread (this is almost certainly a race condition). Also the worlds dictionary is NOT being accessed safely as there seem to be multiple threads that could potentially be running at the same time (multiple worlds) however this Dictionary is not concurrent. I'm not sure if a mutex or ConcurrentDictionary should be used or potentially even another solution.

ZakBerkelaar commented 2 years ago

The bug label has been assigned due to the aforementioned concurrency issues.