Set the Thread
IsBackground[
^] property to true before you start it: threads marked in this way are automatically killed by the framework when your application exits.
If you don't, they need to terminate themselves when the rest of the app closes (this is to give a "graceful" way for the thread to shut down tidily)
"Where do I set that bool in my code? See that my thread has not been named."
You're kidding, right? :laugh:
Thread t = new Thread(() =>
{
client = server.AcceptTcpClient();
MessageBox.Show("Connected To Client");
if (client.Connected)
{
ServerReceive();
}
});
t.IsBackground = true;
t.Start();