DreTaX
DreTaX

Reputation: 836

C# Thread is not calling the method

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)
    {

Upvotes: 0

Views: 405

Answers (1)

DreTaX
DreTaX

Reputation: 836

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.

Upvotes: 1

Related Questions