0

I'm doing a client-server sorta stuff, and I had no trouble with It. But yesterday the server stopped executing the thread, which means for some reason It doesn't call the method.

You can see my code below, and this is the output:

What could be the problem?

12/18/2016 11:22:30 AM [Console] The local End point is: 0.0.0.0:28017 12/18/2016 11:22:30 AM [Console] Waiting for a connection..... 12/18/2016 11:22:30 AM [Console] Thread Started! True System.Threading.Thread Lowest True 

Code:

ServerLogger.Log("The local End point is: " + myList.LocalEndpoint); ServerLogger.Log("Waiting for a connection....."); Thread t = new Thread(ThreadVoid); t.Priority = ThreadPriority.Highest; // I added this because I thought It might help. t.Start(); ServerLogger.Log("Thread Started! " + t.IsAlive + " " + t + " " + t.Priority + " " + Run); internal static void ThreadVoid() { ServerLogger.Log("Waiting for connection... (Thread) " + Run); while (Run) { 
5
  • Are you sure Run isn't false? Commented Dec 18, 2016 at 10:30
  • I am. But It wouldn't really matter, since I'm not even getting the first message of the ThreadVoid() Commented Dec 18, 2016 at 10:31
  • I've tried your code, without logging and with Run = true. It works. There is something else, that doesn't work. Commented Dec 18, 2016 at 10:31
  • how many threads do you start? Commented Dec 18, 2016 at 10:32
  • Just one from the main thread. I will look into It deeply a bit more and see what could be the problem. Commented Dec 18, 2016 at 10:33

1 Answer 1

1

Had to dig in, the try catch inside the thread didnt work, but outside it did.

12/18/2016 4:18:07 PM [Console] ERROR System.IO.FileNotFoundException: Could not load file or assembly 'System.Drawing,

Solved.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.