I have some problems with System.NullReferenceException. When server do things and we first check user is not null and then he disconnect and server progress something and it tr
Who is setting User to null and where? While your thread sleeps, somebody is obviously setting the User variable to null, causing the crash.
User
Besides: "Magical sleeps" will not solve any problems. You need proper locking here.