Issue: In multiplayer the server would crash when exiting tModLoader.
Solution: Added null checks in RecievePacket and changed to Main.netMode != NetmodeID.SinglePlayer in ToolHandler.OnModLoader
Issue: tModLoader would fail to exit properly if the threads used to preloadAssets did not finish. The itemThread was particularly problematic taking upwards of 90 seconds to complete and forcing a process termination before tModLoader could be started again.
Solution: Made them background threads to prevent orphan threads
Issue: In multiplayer the server would crash when exiting tModLoader. Solution: Added null checks in
RecievePacket
and changed toMain.netMode != NetmodeID.SinglePlayer
inToolHandler.OnModLoader
Issue: tModLoader would fail to exit properly if the threads used to
preloadAssets
did not finish. TheitemThread
was particularly problematic taking upwards of 90 seconds to complete and forcing a process termination before tModLoader could be started again. Solution: Made them background threads to prevent orphan threads